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

tracer: honor tracecontext propagation style precedence #2252

Merged
merged 3 commits into from
Oct 11, 2023

Conversation

purple4reina
Copy link
Contributor

@purple4reina purple4reina commented Oct 5, 2023

What does this PR do?

This PR changes the precedence of the tracecontext propagation style to match what is requested by the user exactly. Previously, this propagation style was always set as the first style, even if the user specifies it later in the chain.

Motivation

This new behavior aligns with the behavior specified in our public docs and with other language tracers.

If multiple extraction styles are enabled, extraction attempts are made in the order that those styles are specified. The first successfully extracted value is used.

Open Questions

While this change is just a bug fix, it still has the potential to break customer traces. Therefore we need to be deliberate with how we release it.

Reviewer's Checklist

  • Changed code has unit tests for its functionality at or near 100% coverage.
  • There is a benchmark for any new code, or changes to existing code.
  • If this interacts with the agent in a new way, a system test has been added.

For Datadog employees:

  • If this PR touches code that handles credentials of any kind, such as Datadog API keys, I've requested a review from @DataDog/security-design-and-guidance.
  • This PR doesn't touch any of that.

Unsure? Have a question? Request a review!

@purple4reina purple4reina requested a review from a team October 5, 2023 20:05
Co-authored-by: Diana Shevchenko <40775148+dianashevchenko@users.noreply.github.com>
@pr-commenter
Copy link

pr-commenter bot commented Oct 6, 2023

Benchmarks

Benchmark execution time: 2023-10-06 15:16:48

Comparing candidate commit c05ebe1 in PR branch rey.abolofia/w3c-precedence with baseline commit 9435e66 in branch main.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 40 metrics, 1 unstable metrics.

@katiehockman katiehockman changed the title Honor tracecontext propagation style precedence. tracer: honor tracecontext propagation style precedence Oct 6, 2023
@katiehockman katiehockman merged commit f72e6dd into main Oct 11, 2023
51 of 52 checks passed
@katiehockman katiehockman deleted the rey.abolofia/w3c-precedence branch October 11, 2023 18:54
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.

3 participants