-
Notifications
You must be signed in to change notification settings - Fork 295
Closed
Description
The spec for tracing includes a trace flags in the context:
TraceFlags contain details about the trace. Unlike TraceState values, TraceFlags are present in all traces. The current version of the specification only supports a single flag called sampled.
However, the otlp proto message has no appropriate proto field to store the flags for message Span and message Link.
I think the flags are important to be encoded in the otlp format for the following reasons:
- It is handy that when holding a link, to be able to tell if it points on a sampled or non sampled span. For example in messaging specification, a consumer may link to a producer span, but it is possible and common that the consumer is sampled and the producer is not. Currently, consumer links just store
trace_id,span_idandtrace_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. - OTLP can be handy for storing spans, not only for transmitting them. For transmitting spans from SDKs to collector, we do not anticipate any non-sampled spans. However, someone might need to serialize and deserialize non-sampled spans (for example - to debug) in which case this data will currently be lost. I think protocol should support this kind of use-cases
- Even though flags currently only support single "sampled" flag, they can be extended in the future to hold new values. We cannot anticipate the use of these future values, and having them in the otlp model will allow using it always.
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?
joaopgrassi, dyladan and pmm-sumo
Metadata
Metadata
Assignees
Labels
No labels