Skip to content

Improvements for WAF telemetry metrics#5113

Merged
smola merged 2 commits into
masterfrom
smola/waf-missing-metric-tags
Apr 26, 2023
Merged

Improvements for WAF telemetry metrics#5113
smola merged 2 commits into
masterfrom
smola/waf-missing-metric-tags

Conversation

@smola

@smola smola commented Apr 25, 2023

Copy link
Copy Markdown
Member

What Does This Do

Improvements for WAF telemetry metrics

  • Prefix MetricCollector and related classes with Waf. These are currently strongly coupled to WAF metrics.
  • Add missing tags for waf.updates and waf.requests.
  • Whenever there is a rules update, flush waf.requests, since further requests need a new event_rules_version tag.
  • Do not double count blocked requests.

Motivation

Get our WAF telemetry up to date with the spec.

Additional Notes

It might be a good idea to unify some of the code to collect IAST and WAF telemetry metrics, but that's out of scope for this PR.

@smola smola added the comp: asm waf Application Security Management (WAF) label Apr 25, 2023
@smola
smola marked this pull request as ready for review April 25, 2023 12:31
@smola
smola requested review from a team as code owners April 25, 2023 12:31
@pr-commenter

pr-commenter Bot commented Apr 25, 2023

Copy link
Copy Markdown

Benchmarks

Parameters

Baseline Candidate
commit 1.13.0-SNAPSHOT~2b0ce6b198 1.13.0-SNAPSHOT~7ac3c728c7
config baseline candidate
See matching parameters
Baseline Candidate
module Agent Agent
parent None None

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 22 cases.

See unchanged results
scenario Δ mean execution_time
scenario:Startup-base-Agent same
scenario:Startup-base-Agent.start same
scenario:Startup-base-BytebuddyAgent same
scenario:Startup-base-GlobalTracer same
scenario:Startup-base-AppSec same
scenario:Startup-base-Remote Config same
scenario:Startup-base-Telemetry same
scenario:Startup-iast-Agent unsure
[+0.020s; +0.158s] or [+0.213%; +1.659%]
scenario:Startup-iast-Agent.start same
scenario:Startup-iast-BytebuddyAgent same
scenario:Startup-iast-GlobalTracer same
scenario:Startup-iast-AppSec same
scenario:Startup-iast-IAST same
scenario:Startup-iast-Remote Config same
scenario:Startup-iast-Telemetry same
scenario:Startup-waf-Agent unsure
[+0.023s; +0.211s] or [+0.251%; +2.270%]
scenario:Startup-waf-Agent.start same
scenario:Startup-waf-BytebuddyAgent same
scenario:Startup-waf-GlobalTracer same
scenario:Startup-waf-AppSec same
scenario:Startup-waf-Remote Config same
scenario:Startup-waf-Telemetry same

@smola
smola force-pushed the smola/waf-missing-metric-tags branch 2 times, most recently from 0ef7c63 to ffaa8f9 Compare April 25, 2023 14:47
smola added 2 commits April 26, 2023 09:44
* Prefix `MetricCollector` and related classes with `Waf`. These are
  currently strongly coupled to WAF metrics.
* Add missing tags for waf.updates and waf.requests.
* Whenever there is a rules update, flush waf.requests, since further
  requests need a new event_rules_version tag.
* Do not double count blocked requests.
@smola
smola force-pushed the smola/waf-missing-metric-tags branch from ffaa8f9 to 7ac3c72 Compare April 26, 2023 07:45

@PerfectSlayer PerfectSlayer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weird that git fails to detect file rename 🤷

@smola
smola merged commit cfccc75 into master Apr 26, 2023
@smola
smola deleted the smola/waf-missing-metric-tags branch April 26, 2023 12:15
@github-actions github-actions Bot added this to the 1.13.0 milestone Apr 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: asm waf Application Security Management (WAF)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants