-
Notifications
You must be signed in to change notification settings - Fork 811
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] AspNetCore instrumentation Query redaction does not respect the environment variable set in runtime #6060
Comments
In ASP.NET Core, the recommended way to configure environment variables is by using Did you try using this approach to set the environment variable? Reference: ASP.NET Core Configuration - Environment Variables OpenTelemetry .NET relies on |
Thanks, that explains why it does not work in my repro since the host configuration is already built. If I move the I guess I have to inform my SDK consumer to add the env var or appSetting explicitly. Is it possible to expose these kinds of configuration through code so that we don't need such hard-coded value everywhere |
I would like to point out that this is not possible for non ASP.Net Core apps... The application I am having the problem with is a command-line... |
@rajkumar-rangaraj Any thoughts |
@CEbbinghaus / @jundayin If you are experiencing an issue with OpenTelemetry in a console app, would you mind creating a new GitHub issue with a minimal reproducible example? This will help us better understand and investigate the problem. |
@rajkumar-rangaraj here is the non asp.net core repro: #6118 |
Package
OpenTelemetry
Package Version
Runtime Version
net8.0
Description
The query attributes redaction does not respect the environment variable set in runtime.
Steps to Reproduce
Expected Result
When the environment variable is successfully set during runtime before OpenTelemetry is registered, the Query redaction should be disabled
Actual Result
The query redaction is still being enabled
Additional Context
Please refer this repo https://github.com/jundayin/OpenTelemetryEnvRepro
The text was updated successfully, but these errors were encountered: