diff --git a/lib/datadog/appsec/processor/context.rb b/lib/datadog/appsec/processor/context.rb index 70afe4cb31..c8f260012e 100644 --- a/lib/datadog/appsec/processor/context.rb +++ b/lib/datadog/appsec/processor/context.rb @@ -21,7 +21,7 @@ def initialize(handle, telemetry:) @events = [] @run_mutex = Mutex.new - @libddwaf_debug_tag = "libddwaf:#{WAF::VERSION::STRING}" + @libddwaf_debug_tag = "libddwaf:#{WAF::VERSION::STRING} method:ddwaf_run" end def run(persistent_data, ephemeral_data, timeout = WAF::LibDDWAF::DDWAF_RUN_TIMEOUT) diff --git a/spec/datadog/appsec/processor/context_spec.rb b/spec/datadog/appsec/processor/context_spec.rb index a482c410ef..6949b6d131 100644 --- a/spec/datadog/appsec/processor/context_spec.rb +++ b/spec/datadog/appsec/processor/context_spec.rb @@ -254,7 +254,7 @@ end it 'sends telemetry error' do - expect(telemetry).to receive(:error).with(/libddwaf:[\d.]+ execution error: :err_invalid_object/) + expect(telemetry).to receive(:error).with(/libddwaf:[\d.]+ method:ddwaf_run execution error: :err_invalid_object/) context.run(input, {}, timeout) end @@ -269,7 +269,7 @@ let(:result) { context.run(input, {}, timeout) } it 'sends telemetry report' do - expect(telemetry).to receive(:error).with(/libddwaf:[\d.]+ execution error: :err_internal/) + expect(telemetry).to receive(:error).with(/libddwaf:[\d.]+ method:ddwaf_run execution error: :err_internal/) expect(telemetry).to receive(:report) .with(kind_of(Datadog::AppSec::WAF::LibDDWAF::Error), description: 'libddwaf internal low-level error')