Skip to content
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

OpenTracing Shim: Allow invalid but sampled SpanContext to be returned. #3471

Merged

Conversation

carlosalberto
Copy link
Contributor

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

@yurishkuro please review ;)

This is done to support the jaeger-debug-id functionality,
which allows invalid SpanContext with debug information to
be propagated.
@carlosalberto carlosalberto requested review from a team May 4, 2023 13:39
@carlosalberto
Copy link
Contributor Author

Ping @yurishkuro

Copy link
Member

@yurishkuro yurishkuro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to see a reference implementation first. This could mean much larger changes to the SDK implementation, eg handling parent context that is sampled but doesn't have a trace id. Also, the current SDK span context does not have a place to store debug-id. The ticket mentions trace state, but it would cause the value to propagate.

@Oberon00
Copy link
Member

Oberon00 commented May 9, 2023

Most likely, this will not be implementable as many SDKs will normalize any invalid SpanContext to the completely empty one, losing the sampling bit: #753

Tangentially related also #2176

@yurishkuro
Copy link
Member

I do think we should implement & support this. This was quite a common debugging workflow at Uber with Jaeger SDK. But my objection was to starting with changing the spec without having an implementation and full understanding what else needs to change in the SDK.

@carlosalberto
Copy link
Contributor Author

@yurishkuro So https://github.com/open-telemetry/opentelemetry-java/pull/5380/files has the changes we would need for Java, plus some simulation of how this could be done. I'm guessing you want a little more 'complete'?

cc @ChenX1993

@yurishkuro
Copy link
Member

Left some comments in the PR - would like it to be a bit cleaner, but looks promising.

@github-actions
Copy link

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions
Copy link

github-actions bot commented Jun 8, 2023

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions
Copy link

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions github-actions bot added the Stale label Jun 21, 2023
@github-actions
Copy link

github-actions bot commented Jul 5, 2023

Closed as inactive. Feel free to reopen if this PR is still being worked on.

@github-actions github-actions bot closed this Jul 5, 2023
@carlosalberto carlosalberto reopened this Jul 5, 2023
@github-actions
Copy link

Closed as inactive. Feel free to reopen if this PR is still being worked on.

@github-actions github-actions bot closed this Jul 13, 2023
@carlosalberto carlosalberto reopened this Jul 13, 2023
@github-actions
Copy link

Closed as inactive. Feel free to reopen if this PR is still being worked on.

@github-actions github-actions bot closed this Jul 26, 2023
@carlosalberto carlosalberto reopened this Jul 26, 2023
@carlosalberto
Copy link
Contributor Author

@yurishkuro While we iterate on the details of the related PR, should we get this PR merged? Anything else you'd like me to clean up?

@github-actions github-actions bot removed the Stale label Jul 29, 2023
@github-actions
Copy link

github-actions bot commented Aug 6, 2023

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions github-actions bot added the Stale label Aug 6, 2023
Co-authored-by: Yuri Shkuro <yurishkuro@users.noreply.github.com>
@carlosalberto
Copy link
Contributor Author

@MrAlias does the current language (null or empty value being returned) is fine with you?

@github-actions github-actions bot removed the Stale label Aug 8, 2023
@carlosalberto
Copy link
Contributor Author

Merging as we use the suggested "null or empty" statement as recommended.

@carlosalberto carlosalberto merged commit b9c8a02 into open-telemetry:main Aug 10, 2023
6 checks passed
@carlosalberto carlosalberto deleted the ot-support-jaeger-debug branch August 10, 2023 16:10
carlosalberto added a commit to carlosalberto/opentelemetry-specification that referenced this pull request 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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants