-
Notifications
You must be signed in to change notification settings - Fork 839
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
[OpentracingShim] Support returning non-null SpanContextShim in Propagation.extractTextMap
when traceId and SpanId are not present in OTel SpanContext
#5339
Labels
Feature Request
Suggest an idea for this project
Comments
paging @carlosalberto |
If you are ok with the request, then you can assign to me. |
I think this makes sense, as I remember seeing this in Jaeger and was curious whether we would ever need this. @yurishkuro any opinion on this, or are we ok supporting this? |
Ping @yurishkuro |
+1 |
carlosalberto
added a commit
to open-telemetry/opentelemetry-specification
that referenced
this issue
Aug 10, 2023
…d. (#3471) This is done to support the `jaeger-debug-id` functionality, which allows invalid SpanContext with debug information to be propagated. This came up through an issue in Java: open-telemetry/opentelemetry-java#5339
carlosalberto
added a commit
to carlosalberto/opentelemetry-specification
that referenced
this issue
Oct 31, 2024
…d. (open-telemetry#3471) This is done to support the `jaeger-debug-id` functionality, which allows invalid SpanContext with debug information to be propagated. This came up through an issue in Java: open-telemetry/opentelemetry-java#5339
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
Hi,
The request is to make
Propagation.extractTextMap
method able to conditionally return non-null SpanContextShim when traceId and SpanId are not present OTel SpanContext.Currently it returns null when OTel SpanContext is invalid - no valid traceId and SpanId:
opentelemetry-java/opentracing-shim/src/main/java/io/opentelemetry/opentracingshim/Propagation.java
Lines 47 to 51 in 188210b
The reason is to support jaeger-debug-id use case in OTel when we are migrating from deprecated jaeger-client-go.
To quickly explain what jaeger-debug-id does: it allows users to send a inbound request with such jaeger-debug-id header present to enforce sampling without a parent span.
I can implement a custom propagator to extract the header in maybe TraceState in OTel SpanContext, and implement a custom sampler to detect if it is present in the TraceState to sample the span and to set the attribute.
The only blocker right now is in OpentracingShim: it only returns a non-null bridge SpanContextShim when there OTel SpanContext is valid - traceId and SpanId are valid or baggage is not empty, so there is no way to pass the jaeger-debug-id info into the OTel when creating the span.
Describe the solution you'd like
Since the jaeger-debug-id is very specific to jaeger, and not general to OpenTracing. I am thinking about more generic way to solve it.
One approach I can think of is to make such change:
Then in my custom propagator, I can set the traceFlags to sampled when extracting jaeger-debug-id header.
or
Hope this request make sense. Thanks!
The text was updated successfully, but these errors were encountered: