@@ -110,43 +110,5 @@ describe('LMI Integration Tests', () => {
110110 expect ( awsLambdaSpan ?. attributes . custom . cold_start ) . toBeUndefined ( ) ;
111111 }
112112 } ) ;
113-
114- // All duration metrics tests are skipped - metrics indexing is unreliable
115- // TODO: Investigate why Datadog metrics API returns inconsistent results
116- describe . skip ( 'duration metrics' , ( ) => {
117- it ( 'should emit aws.lambda.enhanced.runtime_duration' , ( ) => {
118- const points = telemetry [ runtime ] . metrics . duration [ 'runtime_duration' ] ;
119- expect ( points . length ) . toBeGreaterThan ( 0 ) ;
120- expect ( points [ points . length - 1 ] . value ) . toBeGreaterThan ( 0 ) ;
121- } ) ;
122-
123- it ( 'should emit aws.lambda.enhanced.billed_duration' , ( ) => {
124- const points = telemetry [ runtime ] . metrics . duration [ 'billed_duration' ] ;
125- expect ( points . length ) . toBeGreaterThan ( 0 ) ;
126- expect ( points [ points . length - 1 ] . value ) . toBeGreaterThan ( 0 ) ;
127- } ) ;
128-
129- it ( 'should emit aws.lambda.enhanced.duration' , ( ) => {
130- const points = telemetry [ runtime ] . metrics . duration [ 'duration' ] ;
131- expect ( points . length ) . toBeGreaterThan ( 0 ) ;
132- expect ( points [ points . length - 1 ] . value ) . toBeGreaterThan ( 0 ) ;
133- } ) ;
134-
135- it ( 'should emit aws.lambda.enhanced.post_runtime_duration' , ( ) => {
136- const points = telemetry [ runtime ] . metrics . duration [ 'post_runtime_duration' ] ;
137- expect ( points . length ) . toBeGreaterThan ( 0 ) ;
138- expect ( points [ points . length - 1 ] . value ) . toBeGreaterThanOrEqual ( 0 ) ;
139- } ) ;
140-
141- it ( 'duration should be >= runtime_duration' , ( ) => {
142- const durationPoints = telemetry [ runtime ] . metrics . duration [ 'duration' ] ;
143- const runtimePoints = telemetry [ runtime ] . metrics . duration [ 'runtime_duration' ] ;
144- expect ( durationPoints . length ) . toBeGreaterThan ( 0 ) ;
145- expect ( runtimePoints . length ) . toBeGreaterThan ( 0 ) ;
146- const duration = durationPoints [ durationPoints . length - 1 ] . value ;
147- const runtimeDuration = runtimePoints [ runtimePoints . length - 1 ] . value ;
148- expect ( duration ) . toBeGreaterThanOrEqual ( runtimeDuration ) ;
149- } ) ;
150- } ) ;
151113 } ) ;
152114} ) ;
0 commit comments