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

Fix OpenTracing context propagation #2289

Merged
merged 3 commits into from
Sep 26, 2022

Conversation

delner
Copy link
Contributor

@delner delner commented Sep 22, 2022

Fixes #2191

Context propagation in OpenTracing was not working properly. Ordinarily, each new Span should get its own SpanContext, containing the relevant Datadog::Tracing::Context state. Instead, of building this SpanContext with the current state, it would build it with the previous state in inherited from its parent. This would case the child to inherit the grandparent's ID as its parent ID.

This change makes sure we build a new SpanContext per Span, and only propagate the relevant Datadog::Tracing::Context.

@delner delner added bug Involves a bug integrations Involves tracing integrations labels Sep 22, 2022
@delner delner self-assigned this Sep 22, 2022
@delner delner requested a review from a team September 22, 2022 19:56
Copy link
Member

@marcotc marcotc left a comment

Choose a reason for hiding this comment

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

Confirmed to work in a production setting.

@marcotc marcotc merged commit bea1360 into master Sep 26, 2022
@marcotc marcotc deleted the fix/opentracing_context_propagation branch September 26, 2022 19:59
@github-actions github-actions bot added this to the 1.5.0 milestone Sep 26, 2022
@marcotc marcotc modified the milestones: 1.5.0, 1.4.2 Sep 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Involves a bug integrations Involves tracing integrations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unusual behavior using manual instrumentation of distributed traces using OpenTracer in v1.x
3 participants