File tree Expand file tree Collapse file tree
main/java/com/datadog/appsec/ddwaf
test/groovy/com/datadog/appsec/ddwaf Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -446,7 +446,7 @@ public void onDataAvailable(
446446 if (!reqCtx .isWafContextClosed ()) {
447447 log .error ("Error calling WAF" , e );
448448 }
449- incrementErrorCodeMetric (gwCtx , e .code );
449+ incrementErrorCodeMetric (reqCtx , gwCtx , e .code );
450450 return ;
451451 } catch (AbstractWafException e ) {
452452 incrementErrorCodeMetric (reqCtx , gwCtx , e .code );
Original file line number Diff line number Diff line change @@ -1786,7 +1786,6 @@ class WAFModuleSpecification extends DDSpecification {
17861786 1 * wafMetricCollector. wafInit(Waf . LIB_VERSION , _, true )
17871787 1 * ctx. getRaspMetrics()
17881788 1 * ctx. getRaspMetricsCounter()
1789- (0 .. 1 ) * WafMetricCollector . get(). wafRequestError() // TODO: remove this line when WAFModule is removed
17901789 1 * wafMetricCollector. raspErrorCode(RuleType . SQL_INJECTION , wafErrorCode. code)
17911790 0 * _
17921791
@@ -1815,7 +1814,6 @@ class WAFModuleSpecification extends DDSpecification {
18151814 1 * wafContext. run(_, _, _) >> { throw createWafException(wafErrorCode) }
18161815 1 * wafMetricCollector. wafInit(Waf . LIB_VERSION , _, true )
18171816 2 * ctx. getWafMetrics()
1818- (0 .. 1 ) * WafMetricCollector . get(). wafRequestError() // TODO: remove this line when WAFModule is removed
18191817 1 * wafMetricCollector. wafErrorCode(wafErrorCode. code)
18201818 0 * _
18211819
You can’t perform that action at this time.
0 commit comments