File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments