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

w3c: ensure _dd.parent_id is set using x-datadog-parent-id #2696

Merged
merged 13 commits into from
May 28, 2024

Conversation

mabdinur
Copy link
Contributor

@mabdinur mabdinur commented May 15, 2024

What does this PR do?

Improves support for w3c tracecontext propagation. If the last datadog parent id can not be set using the p key in tracestate set _dd.parent_id using the x-datadog-parent-id header.

Motivation

The _dd.parent_id tag is used as a back up parent_id. If Span.parent_id can not be found then _dd.parent_id will be used to generate trace flamegraphs. This will reduce the frequency of broken traces in the Datadog UI

Passing the following system tests: https://github.com/DataDog/system-tests/blob/main/tests/parametric/test_headers_tracecontext.py#L717-%23L809

Reviewer's Checklist

  • Changed code has unit tests for its functionality at or near 100% coverage.
  • System-Tests covering this feature have been added and enabled with the va.b.c-dev version tag.
  • 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.
  • Add an appropriate team label so this PR gets put in the right place for the release notes.
  • Non-trivial go.mod changes, e.g. adding new modules, are reviewed by @DataDog/dd-trace-go-guild.

Unsure? Have a question? Request a review!

@pr-commenter
Copy link

pr-commenter bot commented May 15, 2024

Benchmarks

Benchmark execution time: 2024-05-24 19:09:47

Comparing candidate commit 5596e58 in PR branch munir/w3c-phase-3 with baseline commit b0aa1b8 in branch main.

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

scenario:BenchmarkStartSpanConcurrent-24

  • 🟥 execution_time [+191.228ns; +399.572ns] or [+2.892%; +6.042%]

@mabdinur mabdinur marked this pull request as ready for review May 17, 2024 14:43
@mabdinur mabdinur requested a review from a team as a code owner May 17, 2024 14:43
ddtrace/tracer/textmap.go Outdated Show resolved Hide resolved
ddtrace/tracer/textmap.go Outdated Show resolved Hide resolved
ddtrace/tracer/textmap.go Outdated Show resolved Hide resolved
ddtrace/tracer/textmap.go Outdated Show resolved Hide resolved
ddtrace/tracer/textmap.go Outdated Show resolved Hide resolved
ddtrace/tracer/textmap.go Show resolved Hide resolved
@darccio darccio merged commit b913c87 into main May 28, 2024
157 of 158 checks passed
@darccio darccio deleted the munir/w3c-phase-3 branch May 28, 2024 14:30
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