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

chore(asm): refactor for waf telemetry logs #11181

Merged

Conversation

christophe-papazian
Copy link
Contributor

@christophe-papazian christophe-papazian commented Oct 25, 2024

  • refactor the code for telemetry logs for the waf.
  • add error logs for waf run.
  • improve messages following RFC "In-APP WAF Error Telemetry RFC"
  • update tests accordingly
  • improve code to handle internal errors of libddwaf
  • add test for telemetry log on waf internal errors using mock (we don't have a way to force libddwaf to generate an internal error)

APPSEC-55199

Checklist

  • PR author has checked that all the criteria below are met
  • The PR description includes an overview of the change
  • The PR description articulates the motivation for the change
  • The change includes tests OR the PR description describes a testing strategy
  • The PR description notes risks associated with the change, if any
  • Newly-added code is easy to change
  • The change follows the library release note guidelines
  • The change includes or references documentation updates if necessary
  • Backport labels are set (if applicable)

Reviewer Checklist

  • Reviewer has checked that all the criteria below are met
  • Title is accurate
  • All changes are related to the pull request's stated goal
  • Avoids breaking API changes
  • Testing strategy adequately addresses listed risks
  • Newly-added code is easy to change
  • Release note makes sense to a user of the library
  • If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment
  • Backport labels are set in a manner that is consistent with the release branch maintenance policy

@christophe-papazian christophe-papazian added changelog/no-changelog A changelog entry is not required for this PR. ASM Application Security Monitoring labels Oct 25, 2024
Copy link
Contributor

github-actions bot commented Oct 25, 2024

CODEOWNERS have been resolved as:

ddtrace/appsec/_ddwaf/__init__.py                                       @DataDog/asm-python
ddtrace/appsec/_metrics.py                                              @DataDog/asm-python
ddtrace/appsec/_processor.py                                            @DataDog/asm-python
tests/appsec/appsec/test_telemetry.py                                   @DataDog/asm-python
tests/appsec/contrib_appsec/conftest.py                                 @DataDog/asm-python

@pr-commenter
Copy link

pr-commenter bot commented Oct 25, 2024

Benchmarks

Benchmark execution time: 2024-10-28 10:19:21

Comparing candidate commit 7ef8470 in PR branch christophe-papazian/improve_waf_error_telemetry with baseline commit 83ce118 in branch main.

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

@christophe-papazian christophe-papazian marked this pull request as ready for review October 28, 2024 10:11
@christophe-papazian christophe-papazian requested a review from a team as a code owner October 28, 2024 10:11
@christophe-papazian christophe-papazian enabled auto-merge (squash) October 28, 2024 10:15
@christophe-papazian christophe-papazian merged commit 105018f into main Oct 28, 2024
640 of 643 checks passed
@christophe-papazian christophe-papazian deleted the christophe-papazian/improve_waf_error_telemetry branch October 28, 2024 12:47
@erikayasuda erikayasuda restored the christophe-papazian/improve_waf_error_telemetry branch October 28, 2024 20:51
@erikayasuda erikayasuda deleted the christophe-papazian/improve_waf_error_telemetry branch October 28, 2024 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ASM Application Security Monitoring changelog/no-changelog A changelog entry is not required for this PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants