-
Notifications
You must be signed in to change notification settings - Fork 291
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
[Instrumentation.Owin] Add IConfiguration support #1973
[Instrumentation.Owin] Add IConfiguration support #1973
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1973 +/- ##
===========================================
+ Coverage 73.91% 85.79% +11.88%
===========================================
Files 267 8 -259
Lines 9615 169 -9446
===========================================
- Hits 7107 145 -6962
+ Misses 2508 24 -2484
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@@ -17,18 +18,20 @@ public class OwinInstrumentationOptions | |||
/// Initializes a new instance of the <see cref="OwinInstrumentationOptions"/> class. | |||
/// </summary> | |||
public OwinInstrumentationOptions() | |||
: this(new ConfigurationBuilder().AddEnvironmentVariables().Build()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it be the best option to take IConfiguration
from the user instead of building it with environment variables ourselves? Is the intention here to avoid a public API change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ya this is just about backwards compatibility and not breaking the public API. Nothing should be using this ctor but there is a chance some user is calling it. Perhaps in a test. But this is a prerelease package so we could break it and remove this ctor leaving just have the internal
one. LMK what you think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with this approach.
Relates to #1960
Changes
OTEL_DOTNET_EXPERIMENTAL_OWIN_DISABLE_URL_QUERY_REDACTION
usingIConfiguration
Merge requirement checklist
CHANGELOG.md
files updated for non-trivial changes