@@ -147,25 +147,6 @@ describe('Appsec Waf Telemetry metrics', () => {
147147 } )
148148 } )
149149
150- it ( 'should call trackWafDurations' , ( ) => {
151- appsecTelemetry . updateWafRequestsMetricTags ( {
152- duration : 42 ,
153- durationExt : 52 ,
154- ...metrics
155- } , req )
156-
157- expect ( distribution ) . to . have . been . calledTwice
158-
159- const tag = {
160- waf_version : wafVersion ,
161- event_rules_version : rulesVersion
162- }
163- expect ( distribution . firstCall . args ) . to . be . deep . eq ( [ 'waf.duration' , tag ] )
164- expect ( distribution . secondCall . args ) . to . be . deep . eq ( [ 'waf.duration_ext' , tag ] )
165-
166- expect ( track ) . to . have . been . calledTwice
167- } )
168-
169150 it ( 'should sum waf.duration metrics' , ( ) => {
170151 appsecTelemetry . updateWafRequestsMetricTags ( {
171152 duration : 42 ,
@@ -365,9 +346,6 @@ describe('Appsec Waf Telemetry metrics', () => {
365346
366347 expect ( count ) . to . have . been . calledWith ( 'waf.input_truncated' , { truncation_reason : 1 } )
367348 expect ( inc ) . to . have . been . calledWith ( 1 )
368-
369- expect ( distribution ) . to . have . been . calledWith ( 'waf.truncated_value_size' , { truncation_reason : 1 } )
370- expect ( track ) . to . have . been . calledWith ( 5000 )
371349 } )
372350
373351 it ( 'should report truncated container size metrics' , ( ) => {
@@ -376,9 +354,6 @@ describe('Appsec Waf Telemetry metrics', () => {
376354
377355 expect ( count ) . to . have . been . calledWith ( 'waf.input_truncated' , { truncation_reason : 2 } )
378356 expect ( inc ) . to . have . been . calledWith ( 1 )
379-
380- expect ( distribution ) . to . have . been . calledWith ( 'waf.truncated_value_size' , { truncation_reason : 2 } )
381- expect ( track ) . to . have . been . calledWith ( 300 )
382357 } )
383358
384359 it ( 'should report truncated container depth metrics' , ( ) => {
@@ -387,9 +362,6 @@ describe('Appsec Waf Telemetry metrics', () => {
387362
388363 expect ( count ) . to . have . been . calledWith ( 'waf.input_truncated' , { truncation_reason : 4 } )
389364 expect ( inc ) . to . have . been . calledWith ( 1 )
390-
391- expect ( distribution ) . to . have . been . calledWith ( 'waf.truncated_value_size' , { truncation_reason : 4 } )
392- expect ( track ) . to . have . been . calledWith ( 20 )
393365 } )
394366
395367 it ( 'should combine truncation reasons when multiple truncations occur' , ( ) => {
@@ -401,9 +373,6 @@ describe('Appsec Waf Telemetry metrics', () => {
401373 expect ( result ) . to . have . property ( 'input_truncated' , true )
402374
403375 expect ( count ) . to . have . been . calledWith ( 'waf.input_truncated' , { truncation_reason : 7 } )
404- expect ( distribution ) . to . have . been . calledWith ( 'waf.truncated_value_size' , { truncation_reason : 1 } )
405- expect ( distribution ) . to . have . been . calledWith ( 'waf.truncated_value_size' , { truncation_reason : 2 } )
406- expect ( distribution ) . to . have . been . calledWith ( 'waf.truncated_value_size' , { truncation_reason : 4 } )
407376 } )
408377
409378 it ( 'should not report truncation metrics when no truncation occurs' , ( ) => {
0 commit comments