File tree Expand file tree Collapse file tree
bottlecap/src/lifecycle/invocation Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2248,7 +2248,7 @@ mod tests {
22482248 "client_computed_stats must be propagated to the aws.lambda span payload"
22492249 ) ;
22502250
2251- // Verify _dd.compute_stats is "0" in the built payload tags : client_computed_stats=true
2251+ // Verify _dd.compute_stats is "0" in each span's meta : client_computed_stats=true
22522252 // means the tracer has already computed stats, so neither extension nor backend should.
22532253 let send_data = payload. builder . build ( ) ;
22542254 let libdd_trace_utils:: tracer_payload:: TracerPayloadCollection :: V07 ( payloads) =
@@ -2257,11 +2257,15 @@ mod tests {
22572257 panic ! ( "expected V07 payload" ) ;
22582258 } ;
22592259 for p in payloads {
2260- assert_eq ! (
2261- p. tags. get( crate :: tags:: lambda:: tags:: COMPUTE_STATS_KEY ) ,
2262- Some ( & "0" . to_string( ) ) ,
2263- "_dd.compute_stats must be 0 when client_computed_stats is true"
2264- ) ;
2260+ for chunk in & p. chunks {
2261+ for span in & chunk. spans {
2262+ assert_eq ! (
2263+ span. meta. get( crate :: tags:: lambda:: tags:: COMPUTE_STATS_KEY ) ,
2264+ Some ( & "0" . to_string( ) ) ,
2265+ "_dd.compute_stats must be 0 when client_computed_stats is true"
2266+ ) ;
2267+ }
2268+ }
22652269 }
22662270 }
22672271}
You can’t perform that action at this time.
0 commit comments