Skip to content

Commit

Permalink
Merge pull request #3106 from DataDog/fix-issue-with-reporting-failed…
Browse files Browse the repository at this point in the history
…-loaded-waf-rules

Fix a bug with ASM span tags reporting the number of WAF failed loaded rules
  • Loading branch information
GustavoCaso authored Sep 4, 2023
2 parents 24d393a + 43d2564 commit f9c30b2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/system-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,9 @@ jobs:
- library: ruby
app: rails70
scenario: APPSEC_AUTO_EVENTS_EXTENDED
- library: ruby
app: rack
scenario: APPSEC_RULES_MONITORING_WITH_ERRORS
- library: ruby
app: rack
scenario: SAMPLING
Expand Down
2 changes: 1 addition & 1 deletion lib/datadog/appsec/contrib/rack/request_middleware.rb
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def add_appsec_tags(processor, scope, env)
@oneshot_tags_sent = true

span.set_tag('_dd.appsec.event_rules.loaded', diagnostics['rules']['loaded'].size.to_f)
span.set_tag('_dd.appsec.event_rules.error_count', diagnostics['rules']['loaded'].size.to_f)
span.set_tag('_dd.appsec.event_rules.error_count', diagnostics['rules']['failed'].size.to_f)
span.set_tag('_dd.appsec.event_rules.errors', JSON.dump(diagnostics['rules']['errors']))
span.set_tag('_dd.appsec.event_rules.addresses', JSON.dump(processor.addresses))

Expand Down

0 comments on commit f9c30b2

Please sign in to comment.