Repository navigation
Conversation
spans whose trace ids differ in the high half are different traces. the translator used to group by the low half only and drop the whole group when the high halves differed. it now keeps one trace per full trace id.
the case compares the low half of the trace id only, so it cannot show spans that split into separate traces by high half. the unit tests of the translator cover the split. a control probe with one full trace id stays.
Binary Size Analysis (Agent Data Plane)Baseline: 8c80abe · Comparison: 67a22ed · diff ✅ Binary size difference within thresholdChanges by Module
Detailed Symbol Changes |
There was a problem hiding this comment.
AI review by Claude - workflow run
Patch is correct, with 0 blocking findings. Grouping by the full (high, low) trace ID fixes the drop in #3445, and the new unit tests cover the split. The open questions are about Agent parity in chunk shape, the drop metric's tag that no longer fits, and the correctness coverage that this PR removes.
There was a problem hiding this comment.
More details
The full 128-bit trace ID is used consistently for grouping and emission, keeping traces with matching low halves separate. The completed static review returned no actionable findings.
🤖 Bits Code Review · Commit 64fae74
the low 64 bits identify a trace and the high 64 bits are an optional extension that a hop of 64-bit ids drops. spans that share a low half now share a trace when their high halves are equal or either one is zero. only two different non-zero high halves split them, and a zero-high span joins the first non-zero trace by order of first appearance.
the counter now only counts spans of a trace with an invalid trace id: a length other than 0 or 16 bytes, or a zero low half. the reason tag and the accessor name that cause.
spans of one trace can now carry different high halves. the hex form of the trace id that a span carries in otel.trace_id came from the first span of its trace, so a span with another high half named the wrong id. a span now reuses that string only when its high half is the same.
the spans that share a low half and differ in their high half now stay in one trace, so both sides keep them and the case pairs them. the probes check that adp no longer drops them. the counts follow the fixture: 88 spans in 81 traces reach each side.
Regression Detector (Agent Data Plane)Run ID: Optimization Goals: ✅ No significant changes detectedFine details of change detection per experiment (5)Experiments configured
Bounds Checks: ✅ Passed (5)
ExplanationA change is flagged as a regression when |Δ mean %| > 5.00% in the regressing direction for its optimization goal AND SMP marks the experiment as a regression ( |
There was a problem hiding this comment.
The PR prevents collision-related OTLP span loss, preserves zero-high-half compatibility, and restores collision fixtures. Two new performance regressions remain open: quadratic grouping for large batches sharing a low half, and repeated trace-ID string allocations in mixed-high traces; the earlier review had no open findings.
🤖 Bits Code Review · Commit 05ae23e
Find the trace of a span with a non-zero high half by its full trace ID instead of scanning the traces that share its low half, so a request with many high halves for one low half no longer costs a quadratic scan. A zero high half still joins the first trace of its low half. Cache the hex trace ID per kind of high half, so spans of a trace with a mixed high half share a string too.
There was a problem hiding this comment.
More details
The PR prevents collision-related OTLP span loss while preserving zero-high-half compatibility and restoring collision fixtures. Indexed group lookup eliminates quadratic scanning, and separate zero/nonzero trace-ID string caches eliminate repeated allocations, resolving both earlier findings; no findings remain open.
🤖 Bits Code Review · Commit 10db081
…n difference The mixed_a and mixed_b probes share a low trace id half and have two different non-zero high halves. ADP puts them in two traces on purpose, so the root of the second trace carries _dd.p.dm, and the Agent's single chunk does not.
Summary
An OTLP trace ID has a high and a low 64-bit half. When spans of one payload shared the low half but had different high halves, ADP dropped the whole group. That happens in real traffic when a hop that only understands 64-bit IDs drops the high half, so one trace arrives with some spans at
(0, low)and others at(high, low). Dropping them lost the whole trace.Now spans that share the low half stay in one trace when their high halves are equal or either is zero, and the trace takes the non-zero high half. Spans are split into separate traces only when both high halves are non-zero and differ. Each span also keeps the
otel.trace_idtag of its own ID. The drop reason for invalid IDs is renamed fromforeign_spantoinvalid_trace_id.Change Type
How did you test this PR?
translate_spans: a zero and a non-zero high half merge into one trace in either order, two different non-zero high halves give two traces, a zero-high span joins the first non-zero trace, the same ID gives one trace, a dropped span only affects its own trace, and each span carries its ownotel.trace_id.cargo nextest run -p saluki-componentson the OTLP and sampler tests,cargo nextest run -p otlp-fixtures,cargo clippy -p saluki-components --tests,make fmtandmake check-docs.otlp-traces-conversioncorrectness case and kept its colliding-ID probes. I did not run the case, because it needs Docker.References