-
Notifications
You must be signed in to change notification settings - Fork 791
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
[bug] Instrumentation query redaction does not respect environment variable #6118
Comments
@CEbbinghaus, I didn't executed the code, but you are using https://github.com/open-telemetry/opentelemetry-dotnet-contrib/tree/main/src/OpenTelemetry.Instrumentation.Http. It requires to set |
Ah. Good catch but I think that is more an artifact of my refactoring than the problem. I very confident that by just replacing the environment variable it will still redact even if it is set correctly |
I noticed that your current repro project is based on an ASP.NET Core application, as indicated by the following line in your .csproj file: For a console app, this should instead be: To help isolate the issue and ensure accurate testing, I recommend creating a new console-based application. I created a new console app by copying the content from your repro, and it works as expected. |
It seems @Kielek had the correct answer, when configuring Otel via the HttpClient library rather than ASP.Net Core it requires the It would be really nice if this was documented anywhere rather than requiring comments on random github issues to resolve |
It is part of the doc. |
Package
OpenTelemetry
Package Version
Runtime Version
net8.0
Description
When setting the environment variable from within C# it does not disable the redaction of query parameters, leading to entirely useless telemetry for any service that uses query parameters for anything other than user tracking...
Steps to Reproduce
OTEL_DOTNET_EXPERIMENTAL_ASPNETCORE_DISABLE_URL_QUERY_REDACTION
from within application.Expected Result
It not to redact important or any query parameter for that matter.
Actual Result
It still redacts every single query parameter...
Additional Context
Minimal repro: https://github.com/CEbbinghaus/OpenTelemetryEnvRepro
Related issues:
url.full
andurl.query
attribute values #5532The text was updated successfully, but these errors were encountered: