Skip to content
Open
6 changes: 4 additions & 2 deletions bin/correctness/otlp-fixtures/src/traces/conversion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -566,8 +566,10 @@ fn kind_traces() -> Vec<Vec<ProbeSpan>> {

/// The traces whose spans have trace IDs that share their low half.
///
/// A trace groups spans by the low half of their ID. The two spans of the first and second traces have the same low
/// half and different high halves, and the spans of the third trace have the same ID.
/// The low half of a trace ID identifies the trace, and a zero high half is absent, so spans that share a low half stay
/// together. The two spans of the first trace have different non-zero high halves, those of the second have a zero and
/// a non-zero high half, and those of the third have the same ID. Both sides keep every span of these traces, and the
/// case pairs the spans on their span ID and the low half of the trace ID.
fn high_traces() -> Vec<Vec<ProbeSpan>> {
let span = |name| ProbeSpan::new(HIGH_SERVICE, name, SpanKind::Internal);
vec![
Expand Down
9 changes: 5 additions & 4 deletions docs/development/panoramic.md
Original file line number Diff line number Diff line change
Expand Up @@ -1161,11 +1161,12 @@ their difference as a defect.
### When only one intake receives a span

Use `span.<field>` if the spans pair and one field differs. Use `paths: [spans]` only if an open gap explains why
the entire span is on one side. For example, the Agent keeps `otlpprobe.conv.high.mixed_a` in the trace conversion
case, but ADP drops it. There is no ADP span whose fields `compare` could check.
the entire span is on one side. For example, the Agent keeps the second `feat.rare.status` trace in the trace
obfuscation features case, but the rare sampler of ADP drops it. There is no ADP span whose fields `compare` could
check.

The entry for [this gap](https://github.com/DataDog/saluki/issues/3445) sets `kinds: [missing]` and lists the affected
resources in `when`. Use `extra` for a span only ADP sends. A whole-span entry must set `kinds` to `[missing]` or
The entry for [this gap](https://github.com/DataDog/saluki/issues/3578) sets `kinds: [missing]` and lists the affected
span names in `when`. Use `extra` for a span only ADP sends. A whole-span entry must set `kinds` to `[missing]` or
`[extra]` and select by `name` or `resource`; `service` alone is too broad. Panoramic matches `when` against the span on
the side that has it. If ADP sends the span too, the `missing` path goes stale for that resource and `compare` checks
the paired spans.
Expand Down
15 changes: 7 additions & 8 deletions lib/saluki-components/src/common/otlp/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ pub struct Metrics {
metrics_errors_dispatch: Counter,
metrics_errors_flush: Counter,
traces_errors_bad_request: Counter,
spans_dropped_foreign_trace: Counter,
spans_dropped_invalid_trace_id: Counter,
spans_malformed_peer_service_truncate: Counter,
spans_malformed_peer_service_invalid: Counter,
spans_malformed_base_service_truncate: Counter,
Expand Down Expand Up @@ -150,10 +150,9 @@ impl Metrics {
&self.traces_errors_bad_request
}

/// Spans dropped because their trace group mixed spans from different full trace IDs (two
/// traces sharing a low 64-bit half).
pub fn spans_dropped_foreign_trace(&self) -> &Counter {
&self.spans_dropped_foreign_trace
/// Spans dropped because their trace has an invalid trace ID: a length other than 0 or 16 bytes, or a zero low half.
pub fn spans_dropped_invalid_trace_id(&self) -> &Counter {
&self.spans_dropped_invalid_trace_id
}

pub fn spans_malformed_peer_service_truncate(&self) -> &Counter {
Expand Down Expand Up @@ -193,7 +192,7 @@ impl Metrics {
metrics_errors_dispatch: Counter::noop(),
metrics_errors_flush: Counter::noop(),
traces_errors_bad_request: Counter::noop(),
spans_dropped_foreign_trace: Counter::noop(),
spans_dropped_invalid_trace_id: Counter::noop(),
spans_malformed_peer_service_truncate: Counter::noop(),
spans_malformed_peer_service_invalid: Counter::noop(),
spans_malformed_base_service_truncate: Counter::noop(),
Expand Down Expand Up @@ -240,9 +239,9 @@ pub fn build_metrics(component_context: &ComponentContext) -> Metrics {
metrics_errors_flush: builder.register_counter_with_tags("component_errors_total", [("reason", "flush")]),
traces_errors_bad_request: builder
.register_counter_with_tags("component_errors_total", [("reason", "bad_request")]),
spans_dropped_foreign_trace: builder.register_counter_with_tags(
spans_dropped_invalid_trace_id: builder.register_counter_with_tags(
"component_events_dropped_total",
[("message_type", "otlp_spans"), ("reason", "foreign_span")],
[("message_type", "otlp_spans"), ("reason", "invalid_trace_id")],
),
spans_malformed_peer_service_truncate: builder.register_counter_with_tags(
"component_spans_malformed_total",
Expand Down
Loading
Loading