Skip to content

Commit 2445edf

Browse files
lym953claude
andcommitted
chore(traces): restore comments removed during refactor
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent fde8a0e commit 2445edf

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

bottlecap/src/traces/trace_processor.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ impl TraceChunkProcessor for ChunkProcessor {
8181
span.meta.insert("origin".to_string(), "lambda".to_string());
8282
span.meta
8383
.insert("_dd.origin".to_string(), "lambda".to_string());
84+
// Tell the backend whether to compute stats:
85+
// - "1" (compute on backend) if neither the tracer nor the extension is computing them
86+
// - "0" (skip on backend) if the extension or the tracer has already computed them
8487
let compute_stats_value =
8588
if !self.config.compute_trace_stats_on_extension && !self.client_computed_stats {
8689
"1"
@@ -672,7 +675,8 @@ mod tests {
672675
let tracer_payload = tracer_payload.expect("expected Some payload");
673676

674677
let expected_tags = tags_provider.get_function_tags_map();
675-
// process_traces sets _dd.compute_stats on each span's meta.
678+
// process_traces always sets _dd.compute_stats:"1"
679+
// because compute_trace_stats_on_extension is false and client_computed_stats is false.
676680
let mut expected_span = span.clone();
677681
expected_span
678682
.meta

0 commit comments

Comments
 (0)