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

Simplify sanitizing approach #10383

Closed
surgupta-msft opened this issue Aug 8, 2024 · 1 comment
Closed

Simplify sanitizing approach #10383

surgupta-msft opened this issue Aug 8, 2024 · 1 comment

Comments

@surgupta-msft
Copy link
Contributor

surgupta-msft commented Aug 8, 2024

What problem would the feature you're requesting solve? Please describe.

We need to simplify the class Sanitizer.cs to improve performance. Currently it is using both regex approach and string comparison. We can optimize it to use either of these approaches. Note that the method Sanitize() gets executed a lot as it examines the logs and sanitizes any secret related strings. Also, using regex comparison is very expensive. For that we can use .Net feature GeneratedRegex for performance - https://learn.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-source-generators?pivots=dotnet-8-0#source-generation

@surgupta-msft
Copy link
Contributor Author

Creating draft issue with more information.

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

No branches or pull requests

1 participant