Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WAF telemetry #2735

Merged
merged 1 commit into from
Dec 7, 2024
Merged

WAF telemetry #2735

merged 1 commit into from
Dec 7, 2024

Conversation

cataphract
Copy link
Contributor

Description

See individual commits for descriptions of the changes.

Reviewer checklist

  • Test coverage seems ok.
  • Appropriate labels assigned.

@cataphract cataphract requested review from a team as code owners June 27, 2024 10:26
@codecov-commenter
Copy link

codecov-commenter commented Jun 27, 2024

Codecov Report

Attention: Patch coverage is 34.83146% with 58 lines in your changes missing coverage. Please review.

Project coverage is 72.90%. Comparing base (196c7f2) to head (b30d87e).

Files with missing lines Patch % Lines
appsec/src/extension/commands_helpers.c 36.50% 39 Missing and 1 partial ⚠️
appsec/src/extension/ddtrace.c 34.78% 11 Missing and 4 partials ⚠️
appsec/src/extension/commands/client_init.c 0.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #2735      +/-   ##
============================================
- Coverage     74.82%   72.90%   -1.92%     
  Complexity     2741     2741              
============================================
  Files           110      137      +27     
  Lines         10863    14978    +4115     
  Branches          0     1016    +1016     
============================================
+ Hits           8128    10920    +2792     
- Misses         2735     3506     +771     
- Partials          0      552     +552     
Flag Coverage Δ
appsec-extension 67.84% <34.83%> (?)
tracer-php 74.82% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
appsec/src/extension/request_abort.c 72.28% <ø> (ø)
appsec/src/extension/commands/client_init.c 80.43% <0.00%> (ø)
appsec/src/extension/ddtrace.c 57.25% <34.78%> (ø)
appsec/src/extension/commands_helpers.c 63.56% <36.50%> (ø)

... and 23 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 196c7f2...b30d87e. Read the comment docs.

@pr-commenter
Copy link

pr-commenter bot commented Jun 27, 2024

Benchmarks

Benchmark execution time: 2024-07-13 00:47:21

Comparing candidate commit a225a90 in PR branch glopes/waf-telemetry with baseline commit 4c3832d in branch master.

Found 17 performance improvements and 0 performance regressions! Performance is the same for 161 metrics, 0 unstable metrics.

scenario:EmptyFileBench/benchEmptyFileBaseline

  • 🟩 execution_time [-398.670µs; -235.850µs] or [-14.264%; -8.439%]

scenario:EmptyFileBench/benchEmptyFileBaseline-opcache

  • 🟩 execution_time [-430.977µs; -266.503µs] or [-14.768%; -9.132%]

scenario:EmptyFileBench/benchEmptyFileOverhead

  • 🟩 execution_time [-500.727µs; -340.853µs] or [-15.926%; -10.841%]

scenario:EmptyFileBench/benchEmptyFileOverhead-opcache

  • 🟩 execution_time [-541.737µs; -402.743µs] or [-16.620%; -12.356%]

scenario:LaravelBench/benchLaravelBaseline

  • 🟩 execution_time [-419.144µs; -246.976µs] or [-14.387%; -8.478%]

scenario:LaravelBench/benchLaravelBaseline-opcache

  • 🟩 execution_time [-407.735µs; -267.945µs] or [-13.502%; -8.873%]

scenario:LaravelBench/benchLaravelOverhead

  • 🟩 execution_time [-606.339µs; -426.181µs] or [-18.143%; -12.753%]

scenario:LaravelBench/benchLaravelOverhead-opcache

  • 🟩 execution_time [-565.431µs; -362.429µs] or [-16.594%; -10.636%]

scenario:MessagePackSerializationBench/benchMessagePackSerialization-opcache

  • 🟩 execution_time [-7.998µs; -5.782µs] or [-3.347%; -2.419%]

scenario:SymfonyBench/benchSymfonyBaseline

  • 🟩 execution_time [-300.154µs; -218.546µs] or [-5.000%; -3.641%]

scenario:SymfonyBench/benchSymfonyBaseline-opcache

  • 🟩 execution_time [-314.024µs; -269.696µs] or [-5.139%; -4.413%]

scenario:SymfonyBench/benchSymfonyOverhead

  • 🟩 execution_time [-734.478µs; -678.602µs] or [-10.406%; -9.615%]

scenario:SymfonyBench/benchSymfonyOverhead-opcache

  • 🟩 execution_time [-720.026µs; -639.954µs] or [-10.068%; -8.948%]

scenario:TraceSerializationBench/benchSerializeTrace

  • 🟩 execution_time [-8.473µs; -5.227µs] or [-4.195%; -2.588%]

scenario:TraceSerializationBench/benchSerializeTrace-opcache

  • 🟩 mem_peak [-167.139KB; -62.645KB] or [-7.538%; -2.825%]

scenario:WordPressBench/benchWordPressOverhead

  • 🟩 execution_time [-11.984ms; -9.469ms] or [-5.473%; -4.325%]

scenario:WordPressBench/benchWordPressOverhead-opcache

  • 🟩 execution_time [-10.767ms; -8.338ms] or [-4.933%; -3.821%]

@cataphract cataphract force-pushed the glopes/waf-telemetry branch 2 times, most recently from 8464095 to d91cd3f Compare June 27, 2024 17:35
ext/telemetry.c Outdated Show resolved Hide resolved
@cataphract cataphract force-pushed the glopes/waf-telemetry branch 5 times, most recently from e777ab6 to 8239978 Compare July 4, 2024 16:53
@cataphract cataphract closed this Jul 5, 2024
@cataphract cataphract force-pushed the glopes/waf-telemetry branch from 8239978 to 3cdc077 Compare July 5, 2024 08:21
@cataphract cataphract reopened this Jul 5, 2024
@cataphract cataphract force-pushed the glopes/waf-telemetry branch 9 times, most recently from 6b37ec2 to ad72485 Compare July 11, 2024 17:19
@cataphract cataphract force-pushed the glopes/waf-telemetry branch 3 times, most recently from 1b22395 to a225a90 Compare July 13, 2024 00:19
@cataphract cataphract force-pushed the glopes/waf-telemetry branch from a225a90 to ff61a19 Compare October 10, 2024 12:13
@pr-commenter
Copy link

pr-commenter bot commented Oct 10, 2024

Benchmarks [ tracer ]

Benchmark execution time: 2024-12-06 17:37:19

Comparing candidate commit b30d87e in PR branch glopes/waf-telemetry with baseline commit 196c7f2 in branch master.

Found 3 performance improvements and 2 performance regressions! Performance is the same for 173 metrics, 0 unstable metrics.

scenario:ComposerTelemetryBench/benchTelemetryParsing

  • 🟥 execution_time [+1.313µs; +2.887µs] or [+2.759%; +6.065%]

scenario:PDOBench/benchPDOBaseline

  • 🟩 execution_time [-15.216µs; -10.878µs] or [-7.935%; -5.673%]

scenario:PDOBench/benchPDOBaseline-opcache

  • 🟩 execution_time [-17.148µs; -9.187µs] or [-8.994%; -4.819%]

scenario:SamplingRuleMatchingBench/benchRegexMatching4

  • 🟥 execution_time [+194.825ns; +678.175ns] or [+2.834%; +9.865%]

scenario:TraceFlushBench/benchFlushTrace

  • 🟩 execution_time [-1000.000ns; -1000.000ns] or [-50.000%; -50.000%]

@pr-commenter
Copy link

pr-commenter bot commented Oct 10, 2024

Benchmarks [ appsec ]

Benchmark execution time: 2024-12-06 17:47:06

Comparing candidate commit b30d87e in PR branch glopes/waf-telemetry with baseline commit 196c7f2 in branch master.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 0 unstable metrics.

@cataphract cataphract force-pushed the glopes/waf-telemetry branch 4 times, most recently from 4e07791 to e00d8b6 Compare October 15, 2024 11:47
Copy link
Contributor

@Anilm3 Anilm3 left a comment

Choose a reason for hiding this comment

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

I left a number of comments, everything looks correct albeit there could be some improvements around the helper telemetry API and the naming conventions.

appsec/src/extension/commands_helpers.c Outdated Show resolved Hide resolved
appsec/src/extension/commands_helpers.c Show resolved Hide resolved
appsec/src/extension/ddtrace.h Show resolved Hide resolved
appsec/src/helper/client.cpp Outdated Show resolved Hide resolved
appsec/src/helper/client.cpp Outdated Show resolved Hide resolved
appsec/src/helper/metrics.cpp Outdated Show resolved Hide resolved
appsec/src/helper/remote_config/client_handler.cpp Outdated Show resolved Hide resolved
appsec/src/helper/service.hpp Show resolved Hide resolved
appsec/src/helper/service.hpp Show resolved Hide resolved
appsec/src/helper/subscriber/waf.cpp Show resolved Hide resolved
@cataphract cataphract requested a review from a team as a code owner December 5, 2024 12:35
@cataphract cataphract force-pushed the glopes/waf-telemetry branch 3 times, most recently from 15e82d8 to 43b9267 Compare December 6, 2024 17:01
@cataphract cataphract force-pushed the glopes/waf-telemetry branch from 43b9267 to b30d87e Compare December 6, 2024 17:08
@cataphract cataphract merged commit b0da77f into master Dec 7, 2024
502 of 531 checks passed
@cataphract cataphract deleted the glopes/waf-telemetry branch December 7, 2024 12:47
@github-actions github-actions bot added this to the 1.6.0 milestone Dec 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants