Repository navigation
Keep traces with different global tags in one OTLP payload rather than eagerly flushing - #13112
Conversation
Both classes decide which span tags become OTLP attributes. Keep OtlpSpanAttributes as the static helper for keys and baggage rules, and nest the per-span tag writer as OtlpSpanAttributes.Writer. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Instead of flushing the payload whenever a trace's global tags differ from the payload's, start a new resource within the same payload. Each resource carries the global tags of its traces, and the collectors keep the current and previous resource cached so traces interleaving old and new tags after a remote config change don't rebuild them each time. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
97dfcd6 to
5142b32
Compare
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
More details
Resource transitions, framing, and trace-boundary metadata appear consistent in both OTLP encodings when tag sets alternate. Runtime behavior was not exercised.
🤖 Bits Code Review · Commit 5142b32
🟢 Java Benchmark SLOs — All performance SLOs passed
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
Build pipeline has failing jobs for ba7a8cd: What to do next?
DetailsSince those jobs are not marked as being allowed to fail, the pipeline will most likely fail. |
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
|
What Does This Do
When a remote config change updates the global tags (
DD_TAGS), traces with the old and new tags are now exported in the same OTLP payload, each under its own resource carrying its tags. Previously, every switch between tag sets forced the current payload to be flushed.This PR also slightly refactors work from #12985 to fit in better with the dedupe work from #13065.
Motivation
After a remote config tag change, traces started before the change (such as long-lived traces still sending partial flushes) keep their old global tags and arrive interleaved with new traces. Flushing on every switch could turn one batch into many small HTTP requests. OTLP already allows several
ResourceSpansper request, so the tag change no longer needs to cut the payload.Additional Notes
OtlpSpanTagsintoOtlpSpanAttributesas a nestedWriter(237ae23), a follow-up cleanup that didn't make it into Write global tags once on the OTLP trace resource #13065.Contributor Checklist
type:and (comp:orinst:) labels in addition to any other useful labelsclose,fix, or any linking keywords when referencing an issueUse
solvesinstead, and assign the PR milestone to the issueJira ticket: N/A
🤖 Generated with Claude Code