open-telemetry / opentelemetry-specification

Specifications for OpenTelemetry
https://opentelemetry.io
Apache License 2.0
3.75k stars 888 forks source link

Support for Jaeger's "firehose" flag. #1226

Open toumorokoshi opened 3 years ago

toumorokoshi commented 3 years ago

What are you trying to achieve?

Have a discussion to see if we should modify the spec to support setting Jaeger's firehose flag.

What did you expect to see?

From what I can see, the current spec does not explicitly state that users can set custom flags on the TraceFlags attribute. Since custom flags are not possible, users cannot set any flags aside from "Sampled". This means that Jaeger's firehose flag (represented in their flags as 0b100) cannot be set.

Additional context.

This came up while implementing jaeger's propagator in python.

I was also wondering if propagation of the flag is required to child spans, but the pr adding it to jaeger seems to imply it's set on a per-span basis.

toumorokoshi commented 3 years ago

Actually, it looks like I missed some behavior. Looking at the go client, Jaeger actually propagates the TraceFlags to child spans. We would have to modify the spec to explicitly propagate all TraceFlags down to children, rathe than the current:

* `Sampled` flag in `TraceFlags` on `SpanContext`. This flag is propagated via
  the `SpanContext` to child Spans. For more details see the [W3C Trace Context
  specification](https://www.w3.org/TR/trace-context/#sampled-flag). This flag indicates that the `Span` has been
Oberon00 commented 3 years ago

I think this should be implemented the same way as the B3 debug flag, i.e. it should be stored on the Context not the SpanContext (#1045 )

andrewhsu commented 3 years ago

from the issue triage session today, @yurishkuro this is initially triaged as after-ga. please comment if it should be addressed before.

yurishkuro commented 3 years ago

sgtm. Firehose flag is not widely used.