-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
encoding of context flags in otlp messages #382
Comments
Another argument by @dyladan :
|
related issue: #166 |
This sounds reasonable to me. Can you bring this up in the next Specification SIG meeting? @open-telemetry/specs-trace-approvers what do you think? If we decide to add this we need to follow the same approach we have for logs:
|
Thanks @tigrannajaryan , I will bring it up in the next SIG. Why use Another issue, since proto 3 has no |
Ok, I see there is no |
Maybe slightly smaller over the wire (2 bytes instead of 4) but it requires more processing for encode/decode since it requires dropping the msb of each byte and doing some shifting to get the final value. Not sure which concern is more important in general but I would argue for making it consistent with the logs. |
Proto 3 recently added the notion of presence and I think we already have optional fields elsewhere: #366 |
You are right. I am not sure what is better. Anyhow, if we already use |
Amazing, I wasn't aware of it. |
I haven't thought through all the implication, but making it optional sounds right. Whoever is is making this change in the proto need to do the usual interoperability exercise:
For each of the cases with new exporters consider sampled flag set and unset and show that the receivers work as expected. |
I'll try to answer according to my understanding:
Since this is a new proto field with a new number, old receivers should ignore it, which also means they will not have this information available to the processing pipeline which is fine I suppose. If this information is important to the consumer, a new receiver version should be deployeded with support to the flag.
Since this field is optional, new receivers should be able to detect that it is not set, and update the relevant internal data structures with an
New receivers will have this field populated with a valid value sent from new exporters. They should be able to decode it, extract the |
When W3C adds a randomness flag to the trace flags, OTel spans will immediately want to know whether the flag was set, e.g., w3c/trace-context#468 We need this information. My opinion is that because we haven't had this information, allowing the default value of 0 is acceptable; I see this also as another case supporting the introduction of auxiliary version information to the protocol. |
I support. I think this will be the cleanest way to work around the issues and still keep the protocol consistent and correct |
I don't mind having a version, especially if it means the |
The spec for tracing includes a trace flags in the context:
However, the otlp proto message has no appropriate proto field to store the flags for
message Span
andmessage Link
.I think the flags are important to be encoded in the otlp format for the following reasons:
trace_id
,span_id
andtrace_state
. If someone tries to follow the link and cannot find the source span, there is no way to tell if it was not sampled (valid) or simply missing (lost - invalid). It is can also be expensive to follow a link (query to db) - and by knowing if a link is sampled or not one can skip this operation for processing and visualization purposes. There can also be UI value in presenting a link when it is not sampled vs sampled link.Does it make sense to add "trace_flags" field to Span and Link messages in proto? or are there any good reasons why no to include them?
The text was updated successfully, but these errors were encountered: