-
Notifications
You must be signed in to change notification settings - Fork 327
Conversation
@@ -95,13 +100,14 @@ type Mutator interface { | |||
// Insert returns a mutator that inserts a | |||
// value associated with k. If k already exists in the tag map, | |||
// mutator doesn't update the value. | |||
func Insert(k Key, v string) Mutator { | |||
// Metadata applies metadata to the tag. It is optional. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if there're more than one metadatas and they're conflicting? E.g Insert(k, v, unlimitedPropagation, noPropagation)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the last one will be effective.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding a note on the API document, and adding a few tests on this case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added a note in the apis and testcases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM overall
@@ -95,13 +100,14 @@ type Mutator interface { | |||
// Insert returns a mutator that inserts a | |||
// value associated with k. If k already exists in the tag map, | |||
// mutator doesn't update the value. | |||
func Insert(k Key, v string) Mutator { | |||
// Metadata applies metadata to the tag. It is optional. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding a note on the API document, and adding a few tests on this case.
* Add support for tag metadata. * update ocgrpc and ochttp to use new insert/update/upsert api. : * updated existing method optional metadata option. * make TTLNoPropagation and TTLUnlimitedPropagation a function. * changed ttl api. * add test case for multiple TTL metadata. * add test case and note for update/insert api.
* Add support for tag metadata. * update ocgrpc and ochttp to use new insert/update/upsert api. : * updated existing method optional metadata option. * make TTLNoPropagation and TTLUnlimitedPropagation a function. * changed ttl api. * add test case for multiple TTL metadata. * add test case and note for update/insert api.
Replaces #1032