Open ImoutoChan opened 1 month ago
Hi @ImoutoChan
The current feature is still Experimental which is why it's behind the OTEL_DOTNET_EXPERIMENTAL_HTTPCLIENT_DISABLE_URL_QUERY_REDACTION
environment variable.
We're waiting for the OpenTelemetry Community to define how to handle this feature. That conversation is still ongoing: https://github.com/open-telemetry/semantic-conventions/pull/961
That conversation is still ongoing
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.
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.