Skip to content

Propagate the real trace flags in traceparent - #762

Merged
alex268 merged 1 commit into
ydb-platform:masterfrom
Myllyenko:fix/traceparent-trace-flags
Oct 16, 2026
Merged

alex268 merged 1 commit into
ydb-platform:masterfrom
Myllyenko:fix/traceparent-trace-flags

Conversation

@Myllyenko

Copy link
Copy Markdown

OtelSpan.getId() always ended the traceparent header with "-01", i.e. marked every trace as sampled. A span dropped by the client's sampler still has a valid context and is propagated, so the server recorded spans of traces the client didn't record, producing orphan server-side traces and extra tracing load.

OtelSpan.getId() always ended the traceparent header with "-01", i.e.
marked every trace as sampled. A span dropped by the client's sampler
still has a valid context and is propagated, so the server recorded spans
of traces the client didn't record, producing orphan server-side traces
and extra tracing load.

Use the trace flags of the span context instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Oct 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.61%. Comparing base (d854009) to head (a35f2ae).

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #762      +/-   ##
============================================
+ Coverage     75.47%   75.61%   +0.13%     
- Complexity     3755     3762       +7     
============================================
  Files           396      396              
  Lines         16842    16843       +1     
  Branches       1780     1780              
============================================
+ Hits          12711    12735      +24     
+ Misses         3515     3493      -22     
+ Partials        616      615       -1     

☔ View full report in Codecov by Harness.
📢 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.

@KirillKurdyukov KirillKurdyukov left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, the server is currently ignoring these flags.

@alex268
alex268 merged commit 5858535 into ydb-platform:master Oct 16, 2026
16 checks passed
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