lib/datadog/appsec/monitor/gateway/watcher.rb in datadog-2.4.0 vs lib/datadog/appsec/monitor/gateway/watcher.rb in datadog-2.5.0

- old
+ new

@@ -33,14 +33,12 @@ span: scope.service_entry_span, user: user, actions: result.actions } - if scope.service_entry_span - scope.service_entry_span.set_tag('appsec.blocked', 'true') if result.actions.include?('block') - scope.service_entry_span.set_tag('appsec.event', 'true') - end - + # We want to keep the trace in case of security event + scope.trace.keep! if scope.trace + Datadog::AppSec::Event.tag_and_keep!(scope, result) scope.processor_context.events << event end end block = Monitor::Reactive::SetUser.publish(op, user)