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

Query Parameter Redaction should be configurable in code. #2082

Closed
Wraith2 opened this issue Sep 18, 2024 · 2 comments
Closed

Query Parameter Redaction should be configurable in code. #2082

Wraith2 opened this issue Sep 18, 2024 · 2 comments
Labels
comp:instrumentation.aspnet Things related to OpenTelemetry.Instrumentation.AspNet enhancement New feature or request

Comments

@Wraith2
Copy link
Contributor

Wraith2 commented Sep 18, 2024

Component

OpenTelemetry.Instrumentation.AspNet

Is your feature request related to a problem?

Query parameter redaction is enabled for aspnet and aspnetcore instrumentation by default which is a reasonable security practice. Once you realise that this behaviour is occuring if you want to turn it off you will have to find out how to do it which will take a lot of searching by users and possibly ending up in the codebase to find that the only way to disable query redaction is to set the OTEL_DOTNET_EXPERIMENTAL_ASPNETCORE_DISABLE_URL_QUERY_REDACTION environment variable to true.

What is the expected behavior?

AspNetCoreTraceInstrumentationOptions and AspNetTraceInstrumentationOptions have an internal bool DisableUrlQueryRedaction property. This property should be public so that this capability is discoverable and configurable.
There is no reason given for the feature to be experimental.

Which alternative solutions or features have you considered?

setting the environment variable.

Additional context

Using secure defaults is a sensible thing to do but obscuring the capability to disable this capability goes beyond opinionated and approaches obstructive.

@Wraith2 Wraith2 added the enhancement New feature or request label Sep 18, 2024
@github-actions github-actions bot added the comp:instrumentation.aspnet Things related to OpenTelemetry.Instrumentation.AspNet label Sep 18, 2024
@TimothyMothra
Copy link
Contributor

Duplicate of #1954.

The current feature is still Experimental which is why it's behind the OTEL_DOTNET_EXPERIMENTAL_HTTPCLIENT_DISABLE_URL_QUERY_REDACTION environment variable instead of the PublicApi.

We're waiting for the OpenTelemetry Community to define how to handle this feature. That conversation is still ongoing: open-telemetry/semantic-conventions#961

@Wraith2
Copy link
Contributor Author

Wraith2 commented Sep 18, 2024

duplicate, i'll move conversation to #1954

@Wraith2 Wraith2 closed this as completed Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:instrumentation.aspnet Things related to OpenTelemetry.Instrumentation.AspNet enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants