Skip to content

[OpenTelemetry] Support configuring sensitive URL query parameters #69092

Description

@DeagleGross

ASP.NET Core uses a fixed list of sensitive query parameters whose values are replaced with REDACTED in the OpenTelemetry url.query attribute.

Support overriding this list through the OpenTelemetry-aligned environment variable:
OTEL_INSTRUMENTATION_SANITIZATION_URL_EXPERIMENTAL_SENSITIVE_QUERY_PARAMETERS (the same precedent as for known http methods. We may expose configuration via public api as well)

The value should be a comma-separated, case-sensitive list that completely replaces the built-in defaults, matching OpenTelemetry's sensitive_query_parameters contract.

When the variable is absent, ASP.NET Core should continue using its built-in list. Microsoft.AspNetCore.Hosting.SuppressActivityUrlQuery should continue to suppress the url.query attribute entirely.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions