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(datadog-headers): ignore invalid tid values in x-datadog-tags #4534

Merged
merged 2 commits into from
Mar 24, 2025

Conversation

mabdinur
Copy link
Contributor

What does this PR do?

  • Ensures only 16 character hexadecimals are extracted from the _dd.p.tid distributed tracing tag. This ensures the ruby tracer does not propagate invalid/unexpected trace ids.

Motivation:

  • Ensure the ruby tracer propagates 128bit trace ids in a manner that is consistent with other datadog libraries.

Change log entry

Ensures the Ruby tracer extracts only 16-character hex values from the _dd.p.tid tag in x-datadog-tags, preventing invalid trace ID propagation.

Additional Notes:

How to test the change?

@mabdinur mabdinur requested a review from a team as a code owner March 24, 2025 14:49
Copy link

👋 Hey @DataDog/ruby-guild, please fill "Change log entry" section in the pull request description.

If changes need to be present in CHANGELOG.md you can state it this way

**Change log entry**

Yes. A brief summary to be placed into the CHANGELOG.md

(possible answers Yes/Yep/Yeah)

Or you can opt out like that

**Change log entry**

None.

(possible answers No/Nope/None)

Visited at: 2025-03-24 14:50:17 UTC

@codecov-commenter
Copy link

codecov-commenter commented Mar 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.75%. Comparing base (535244c) to head (855b4ab).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4534      +/-   ##
==========================================
- Coverage   97.76%   97.75%   -0.02%     
==========================================
  Files        1390     1390              
  Lines       84748    84762      +14     
  Branches     4281     4283       +2     
==========================================
+ Hits        82856    82861       +5     
- Misses       1892     1901       +9     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@datadog-datadog-prod-us1
Copy link
Contributor

datadog-datadog-prod-us1 bot commented Mar 24, 2025

Datadog Report

Branch report: munir/fix-128-trace-id-validations
Commit report: 855b4ab
Test service: dd-trace-rb

✅ 0 Failed, 21007 Passed, 1370 Skipped, 3m 13.12s Total Time

@pr-commenter
Copy link

pr-commenter bot commented Mar 24, 2025

Benchmarks

Benchmark execution time: 2025-03-24 18:25:22

Comparing candidate commit 855b4ab in PR branch munir/fix-128-trace-id-validations with baseline commit 535244c in branch master.

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

Co-authored-by: Marco Costa <marco.costa@datadoghq.com>
@mabdinur mabdinur merged commit 88a2db6 into master Mar 24, 2025
461 checks passed
@mabdinur mabdinur deleted the munir/fix-128-trace-id-validations branch March 24, 2025 18:53
@github-actions github-actions bot added this to the 2.13.0 milestone Mar 24, 2025
@vpellan vpellan mentioned this pull request Apr 2, 2025
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.

3 participants