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(phase 3): ensure last datadog parent id is always recorded #3631

Merged
merged 12 commits into from
Jun 7, 2024

Conversation

mabdinur
Copy link
Contributor

@mabdinur mabdinur commented May 8, 2024

What does this PR do?

Ensures when trace headers with the same trace_id but different span_ids are received by an application the tracecontext headers are treated as the source of truth.

  • The traceparent header will be used to set the parent_id
  • If the conflicting trace information was extracted from datadog headers, the span_id from the datadog headers will be stored in the _dd.parent_id parent_id tag.
  • All other propagation styles are third class citizens. If they conflict with tracecontext headers their span_ids will be overwritten.

This behavior will be validated by the following system-tests: DataDog/system-tests#2385

Motivation:

Provide first class support for services instrumented with opentelemetry and reduce instances of "broken traces".

Additional Notes:

How to test the change?

Unsure? Have a question? Request a review!

@mabdinur mabdinur marked this pull request as ready for review May 14, 2024 21:11
@mabdinur mabdinur requested a review from a team as a code owner May 14, 2024 21:11
@mabdinur mabdinur marked this pull request as draft May 14, 2024 21:46
@mabdinur mabdinur marked this pull request as ready for review May 17, 2024 15:09
@mabdinur mabdinur requested a review from marcotc May 17, 2024 16:44
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 96.96970% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 98.13%. Comparing base (bbef35a) to head (3227a29).
Report is 102 commits behind head on master.

Files Patch % Lines
lib/datadog/tracing/distributed/propagation.rb 93.75% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3631      +/-   ##
==========================================
- Coverage   98.13%   98.13%   -0.01%     
==========================================
  Files        1223     1223              
  Lines       72115    72185      +70     
  Branches     3424     3435      +11     
==========================================
+ Hits        70768    70836      +68     
- Misses       1347     1349       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mabdinur mabdinur requested a review from delner June 4, 2024 17:47
@mabdinur mabdinur added this to the 2.1.0 milestone Jun 4, 2024
@zarirhamza zarirhamza enabled auto-merge (squash) June 7, 2024 20:34
@zarirhamza zarirhamza merged commit c88f117 into master Jun 7, 2024
143 of 145 checks passed
@zarirhamza zarirhamza deleted the munir/w3c-phase-3 branch June 7, 2024 20:45
@marcotc marcotc mentioned this pull request Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants