Use of tags
randy-girard opened this issue ยท 9 comments
For things I want to tag that there doesn't appear to be a standard for yet, do I just define whatever I want?
I am trying to specify some things for views (Within Rails) and want to log the path of the view being rendered for example.
There are other example, where it doesn't appear my data i want to tag on a span has a clear standard for.
Thanks
Standardization of tags is only useful for metadata that tracing backends might want to understand/interpret/aggregate. If you're adding tags for information only then it doesn't really matter much if you call something ip
or ip_address
, a human can still get it. Since you're likely asking about tags that the tracing backend is not going to treat specially, you can name them however you like.
Well to be clear, I am writing my own backend that will be using some of these for special reason, but only within the context of my app and how it reports the information. I guess once those because standard, I can switch them.
yes, that's fair. If you feel strongly that the data points you plan to capture have general purpose usefulness, then it makes sense to open separate issues for each of them and provide arguments why you think they are widely applicable (across languages, etc.)
At this point I don't feel strongly, just trying to get some things down the make sense first. This has been helpful though. Thanks!
I'm trying to understand whether duplicating tag names are legal or not.
Based on the specification, they have no specific time point and rather relate to the entire span. Yet it's not clear if two tags could have the same name and different values within the same span.
@norefle That is currently implementation specific and comes down to the capabilities of the underlying tracer. Do you have opinions about what the behavior should be? Can you mention a few concrete use cases?
I think a general consensus is that tag keys must be unique. Some backends won't support duplicate keys. Some OpenTracing APIs don't allow them either, if only indirectly.
I think a general consensus is that tag keys must be unique. Some backends won't support duplicate keys. Some OpenTracing APIs don't allow them either, if only indirectly.
I believe that it worth to be explicitly mentioned in the specification.
@felixbarny I'm designing an API for the library which will provide functionality to trace arbitrary blocks of the code and I'm not willing to allow users to put random tag names since they could have a special meaning for the service implementing OpenTracing specs. Therefore, the simplest approach is to accept values only and then set some predefined tag name, like "custom". Yet this could lead to the case when a user sets different values multiple times for the same span with the same predefined name. That what brought me to the question above.
I do agree with @Jamim here that uniqueness of the names of tags within one span is worth mentioning in the specs explicitly.