Skip to content

feat: support the new W3C random-trace-id flag#3304

Open
herin049 wants to merge 2 commits intoopen-telemetry:mainfrom
herin049:feat/w3c-trace-random-flag
Open

feat: support the new W3C random-trace-id flag#3304
herin049 wants to merge 2 commits intoopen-telemetry:mainfrom
herin049:feat/w3c-trace-random-flag

Conversation

@herin049
Copy link

@herin049 herin049 commented Jan 8, 2026

Implements #3270

Changes

Introduces an additional RANDOM flag to the TraceFlags bitfield with relevant supporting functions. Adds the is_random function to the IdGenerator trait to allow id generator implementations to specify if trace IDs are randomly generated with respect to the W3C trace context spec. These changes also add logic to add the random-trace-id flag to the current context only if there is no parent context available.

Merge requirement checklist

  • CONTRIBUTING guidelines followed
  • Unit tests added/updated (if applicable)
  • Appropriate CHANGELOG.md files updated for non-trivial, user-facing changes
  • Changes in public API reviewed (if applicable)

@herin049 herin049 requested a review from a team as a code owner January 8, 2026 23:40
@codecov
Copy link

codecov bot commented Jan 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.7%. Comparing base (00e8ea7) to head (0d5dfcd).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #3304   +/-   ##
=====================================
  Coverage   80.6%   80.7%           
=====================================
  Files        129     129           
  Lines      23261   23353   +92     
=====================================
+ Hits       18756   18852   +96     
+ Misses      4505    4501    -4     

☔ 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.

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.

1 participant