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

DEBUG-2334 Dynamic Instrumentation Redactor component #3901

Merged
merged 3 commits into from
Sep 11, 2024
Merged

Conversation

p-datadog
Copy link
Contributor

What does this PR do?
Adds Dynamic Instrumentation Redactor

This component determines whether a variable, attribute or hash element should be redacted based on the identifier name/key name and the type of the value.

Motivation:
Initial implementation of Dynamic Instrumentation for Ruby

Additional Notes:

The Redactor component technically depends on DI settings but they are mocked out in the unit tests.

How to test the change?

Unit tests are included.

@p-datadog p-datadog requested a review from a team as a code owner September 10, 2024 16:21
@p-datadog p-datadog force-pushed the di-redactor branch 2 times, most recently from dd79ae4 to 45d7fe6 Compare September 10, 2024 16:25
@pr-commenter
Copy link

pr-commenter bot commented Sep 10, 2024

Benchmarks

Benchmark execution time: 2024-09-10 20:37:45

Comparing candidate commit 127a2e2 in PR branch di-redactor with baseline commit a5881cb in branch master.

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

scenario:profiler - hold / resume

  • 🟥 throughput [-108269.380op/s; -106789.996op/s] or [-5.427%; -5.353%]

scenario:profiler - sample timeline=false

  • 🟥 throughput [-0.700op/s; -0.670op/s] or [-9.809%; -9.399%]

This component determines whether a variable, attribute or hash element
should be redacted based on the identifier name/key name and the
type of the value.

Unit tests are included.

The Redactor component technically depends on DI settings but
they are mocked out in the unit tests.
@p-datadog
Copy link
Contributor Author

Test cases checked against DataDog/libdatadog#497.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.87%. Comparing base (a5881cb) to head (127a2e2).
Report is 18 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff            @@
##           master    #3901    +/-   ##
========================================
  Coverage   97.86%   97.87%            
========================================
  Files        1279     1281     +2     
  Lines       76520    76620   +100     
  Branches     3747     3753     +6     
========================================
+ Hits        74890    74992   +102     
+ Misses       1630     1628     -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@p-datadog p-datadog merged commit 06aa9ac into master Sep 11, 2024
191 checks passed
@p-datadog p-datadog deleted the di-redactor branch September 11, 2024 14:04
y9v pushed a commit that referenced this pull request Sep 13, 2024
* Dynamic Instrumentation Redactor component

This component determines whether a variable, attribute or hash element
should be redacted based on the identifier name/key name and the
type of the value.

Unit tests are included.

The Redactor component technically depends on DI settings but
they are mocked out in the unit tests.

* add non-ascii test cases

* style

---------

Co-authored-by: Oleg Pudeyev <code@olegp.name>
@TonyCTHsu TonyCTHsu added this to the 2.4.0 milestone Sep 20, 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