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

Add rasp telemetry #3061

Merged
merged 14 commits into from
Feb 6, 2025
Merged

Add rasp telemetry #3061

merged 14 commits into from
Feb 6, 2025

Conversation

estringana
Copy link
Contributor

@estringana estringana commented Jan 29, 2025

Description

Add rasp telemetry metrics

APPSEC-52938

Reviewer checklist

  • Test coverage seems ok.
  • Appropriate labels assigned.

@codecov-commenter
Copy link

codecov-commenter commented Jan 29, 2025

Codecov Report

Attention: Patch coverage is 37.50000% with 10 lines in your changes missing coverage. Please review.

Project coverage is 56.41%. Comparing base (c11372f) to head (e025b0c).
Report is 5 commits behind head on master.

Files with missing lines Patch % Lines
.../Integrations/Filesystem/FilesystemIntegration.php 0.00% 4 Missing ⚠️
appsec/src/extension/commands_helpers.c 0.00% 3 Missing ⚠️
appsec/src/extension/ddappsec.c 50.00% 0 Missing and 3 partials ⚠️

❌ Your patch status has failed because the patch coverage (37.50%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage.

❗ There is a different number of reports uploaded between BASE (c11372f) and HEAD (e025b0c). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (c11372f) HEAD (e025b0c)
tracer-php 11 10
Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##             master    #3061       +/-   ##
=============================================
- Coverage     72.97%   56.41%   -16.56%     
  Complexity     2790     2790               
=============================================
  Files           139      139               
  Lines         15273    15280        +7     
  Branches       1043     1047        +4     
=============================================
- Hits          11145     8620     -2525     
- Misses         3577     6107     +2530     
- Partials        551      553        +2     
Flag Coverage Δ
appsec-extension 68.28% <50.00%> (-0.09%) ⬇️
tracer-php 51.85% <0.00%> (-22.88%) ⬇️

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

Files with missing lines Coverage Δ
appsec/src/extension/commands/request_exec.c 100.00% <100.00%> (ø)
appsec/src/extension/commands_helpers.c 62.56% <0.00%> (-0.47%) ⬇️
appsec/src/extension/ddappsec.c 77.87% <50.00%> (-0.77%) ⬇️
.../Integrations/Filesystem/FilesystemIntegration.php 0.00% <0.00%> (ø)

... and 21 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 c11372f...e025b0c. Read the comment docs.

@estringana estringana force-pushed the estringana/add-rasp-telemetry branch from 5dd1562 to 0627472 Compare January 29, 2025 11:59
@estringana estringana marked this pull request as ready for review February 3, 2025 12:13
@estringana estringana requested review from a team as code owners February 3, 2025 12:13
@cataphract
Copy link
Contributor

cataphract commented Feb 6, 2025

My earlier comment encompassed all the quoted code. You don't need to prepare an RC message enabling ASM and sending a request to force the helper to start.

for (auto const &rule : rasp_metrics_) {
metrics::telemetry_tags tags;
tags.add("rule_type", rule.first);
tags.add("waf_version", ddwaf_get_version());
Copy link
Contributor

Choose a reason for hiding this comment

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

There are two other tags (newly defined) that are missing:

  • event_rules_version
  • block (only for rasp.rule.match)

@estringana estringana merged commit e96c145 into master Feb 6, 2025
683 of 757 checks passed
@estringana estringana deleted the estringana/add-rasp-telemetry branch February 6, 2025 10:35
@github-actions github-actions bot added this to the 1.7.0 milestone Feb 6, 2025
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.

5 participants