-
Notifications
You must be signed in to change notification settings - Fork 306
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
Make DisableUrlQueryRedaction option in OpenTelemetry.Instrumentation.Http public #1954
Comments
Hi @ImoutoChan We're waiting for the OpenTelemetry Community to define how to handle this feature. That conversation is still ongoing: open-telemetry/semantic-conventions#961 |
I understand that some features are still experimetal, but then you should provide them as opt-in, not as opt-out. Right now this experimental feature affects all users who updated their packages to the latest non-preview version. |
As @ImoutoChan says, this could have been made trivial to opt-in OR opt-out, but that wasn't done. This is a breaking change, with no semVer bump. Also exposing the option for people who use Builder and options function semantics would have been the right thing to do, especially since so many tutorials/docs use that convention for configuration. |
I have no problem with redaction existing in the current form and being enabled by default, but I do want to be able to deal with it in a natural way for the language/framework that I'm using. For .Net that means IConfiguration and options classes not only environment variables. The fact that the feature is experimental is immaterial. It has changed the observable behaviour of the library. If it was intended to be hidden and only used by people choosing to use experimental features then it needed to be opt-in not opt-out. If you wanted to you could use the new experimental attribute https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-12.0/experimental-attribute and ifdef obsolete's for down level tfm's forcing people to see and disable the warnings. How long do we have to wait for the semantic convention changes to be approved or rejected? the issue has gone stale several times already. |
The linked PR was closed and replaced by one that is more selective. What further decisions by the OpenTelemetry Community are being waited on in order to determine how this redaction should be configured? |
Component
OpenTelemetry.Instrumentation.Http
Package Version
Runtime Version
net8.0
Description
After update URLs in traces became redacted. There is a property to disable it, but it's internal.
internal bool DisableUrlQueryRedaction { get; set; }
Why is this property internal? If I can disable it through environment variable, I should be able to disable it through code.
Please make it public and set the default value however you like. You're forcing developers to use reflection, this is bad design decision.
You also hide the fact itself that it can be disabled, no one expect hidden internal property on options configuration object.
Steps to Reproduce
No response
Expected Result
No response
Actual Result
No response
Additional Context
The ugly but acceptable workaround is to disable access checks. Add it to your project file:
After that you'll be able to change these properties. Also the same problem is with AspNetCoreInstrumentation, don't forget to disable it there too.
It uses https://github.com/aelij/IgnoresAccessChecksToGenerator, give the author some love.
The text was updated successfully, but these errors were encountered: