Skip to content

Commit 00acf4c

Browse files
committed
fix(stats): don't feed inferred proxy spans to client-side stats concentrator
Inferred spans (API Gateway Tracing) were being fed to the stats concentrator in the early-exit path, creating a separate aggregation bucket with empty http.method/http.endpoint. This doubled the hit count in client-side stats, breaking the system test assertion ok_hits == 5. Inferred spans are proxy-level spans that don't represent real service calls and should not be included in client-side stats.
1 parent b7eb412 commit 00acf4c

1 file changed

Lines changed: 0 additions & 7 deletions

File tree

ext/serializer.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1535,13 +1535,6 @@ ddog_SpanBytes *ddtrace_serialize_span_to_rust_span(ddtrace_span_data *span, ddo
15351535

15361536

15371537
if (!span_sampling_applied && DDTRACE_G(sidecar) && get_DD_TRACE_STATS_COMPUTATION_ENABLED() && ddog_agent_has_stats_computation()) {
1538-
if (inferred_span) {
1539-
// Inferred span won't be serialized, so feed it to the concentrator here.
1540-
ddtrace_span_precomputed inferred_pre;
1541-
ddtrace_precompute_span(inferred_span, &inferred_pre);
1542-
ddtrace_feed_span_to_concentrator(inferred_span, &inferred_pre);
1543-
ddtrace_free_span_precomputed(&inferred_pre);
1544-
}
15451538
ddtrace_feed_span_to_concentrator(span, &pre);
15461539
ddtrace_free_span_precomputed(&pre);
15471540
return NULL;

0 commit comments

Comments
 (0)