-
Notifications
You must be signed in to change notification settings - Fork 77
Conversation
This is just a draft of the API, the implementation isn't there yet. Please let me know what you think. |
namespace opencensus { | ||
namespace tags { | ||
|
||
// ScopedTags is an RAII object, only ever stack-allocate it. While it's in |
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.
is a RAII... While it is in
// tag key was already in use, its value will be replaced. | ||
class ScopedTags { | ||
public: | ||
explicit ScopedTags( |
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.
Looking at other languages:
https://github.com/census-instrumentation/opencensus-java/blob/master/api/src/main/java/io/opencensus/tags/TagContextBuilder.java
https://github.com/census-instrumentation/opencensus-go/blob/master/tag/map.go
It seems to me that we need some possible mutations:
- upsert/put which adds if not exist + update if exists.
- remove which removes a tag.
Should we support these operations? Should we also offer them to modify a TagMap (not in the context)?
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.
ScopedTags does upsert.
We don't currently have a way to delete, and TagMap's API is pretty limited (I'm working on this)
Opened issue #223 to track this. |
No description provided.