Implement default sanitization for logs / tracing #682
Labels
design-discussion
An area of design currently under discussion and open to team and community feedback.
Docs
Milestone
Related to #344 and PR #681, we should sanitize all headers and body (or elide body, rather) by default like we do in other languages. We're pretty consistent across languages, with azure_core (or equivalent) specifying a few common opt-in headers to not sanitize, and individual libraries (and users) can add more.
The body is elided and one has to opt into logging it via diagnostic options. This is separate from just enabling tracing, since typically non-privileged processes can do that. We want developers to have control over whether secret/PII headers and bodies are logged.
See the following for general Azure SDK guidelines:
As just one example (since I know it best), here's a few classes for the .NET Azure SDKs that are relevant. What they do is fairly consistent across languages, including in individual SDKs where we try to all unify on what headers are not sanitized (or redacted) by default.
The text was updated successfully, but these errors were encountered: