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

[trace-obfuscation] Add SQL obfuscator and make other obfuscators run faster #362

Merged
merged 11 commits into from
Mar 19, 2024

Conversation

paullegranddc
Copy link
Contributor

What does this PR do?

This PR:

  • Adds a simple SQL obfuscator based on the java and dotnet implementations
  • Refactor the existing redis obfuscator to use less allocations, bringing a nice (60%) gain in performance
  • Refactor the existing trace tags obfuscator to use less allocations and pre-compute some values, bringing a nice (40%) gain in performance
  • Refactor the trace-obfuscation benches and adding some new ones.

The changes to the existing redis and tags obfuscators should not affect their semantics as they are still passing the existing tests.

Motivation

An SQL obfuscator is needed to make the stats computation in data-pipeline implementation spec compliant.

Additional Notes

Anything else we should know when reviewing?

How to test the change?

Describe here in detail how the change can be validated.

For Reviewers

  • If this PR touches code that signs or publishes builds or packages, or handles credentials of any kind, I've requested a review from @DataDog/security-design-and-guidance.
  • [ x ] This PR doesn't touch any of that.

@paullegranddc paullegranddc requested a review from a team as a code owner March 17, 2024 00:17
Copy link
Contributor

@bantonsson bantonsson left a comment

Choose a reason for hiding this comment

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

Nice work. My only real comment is about the wiring up and running of the benchmarks, standard documented rust way is not working anymore.

trace-obfuscation/src/redis_tokenizer.rs Show resolved Hide resolved
trace-obfuscation/src/sql.rs Outdated Show resolved Hide resolved
@paullegranddc paullegranddc requested a review from a team as a code owner March 18, 2024 14:46
@paullegranddc paullegranddc requested a review from a team as a code owner March 19, 2024 12:50
@paullegranddc paullegranddc merged commit a5b3f8d into main Mar 19, 2024
20 checks passed
@paullegranddc paullegranddc deleted the paullgdc/trace-obfuscation/improve_obfuscation branch March 19, 2024 13:41
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.

2 participants