dotnet / dotnet/aspnetcore

[OpenTelemetry] Support configuring sensitive URL query parameters

Open
#69,092 1 comment 2 reactions 0 assignees View on GitHub
area-hosting
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 10h
Merged PRs (30d)
281

Description

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.

Contributor guide

Open the contributing guide

Research direction

Start by finding the existing configuration for known HTTP methods and the URL query sanitization path in ASP.NET Core. Check how OTEL_INSTRUMENTATION_SANITIZATION_URL_EXPERIMENTAL_SENSITIVE_QUERY_PARAMETERS should replace the defaults, then verify absent-variable behavior, case-sensitive comma-separated values, and continued suppression through Microsoft.AspNetCore.Hosting.SuppressActivityUrlQuery.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
observability
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.