-
Notifications
You must be signed in to change notification settings - Fork 765
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
AddHttpClientInstrumentation uses Options<T>. #3051
Conversation
Codecov Report
@@ Coverage Diff @@
## main #3051 +/- ##
==========================================
- Coverage 84.91% 84.71% -0.20%
==========================================
Files 259 259
Lines 9112 9119 +7
==========================================
- Hits 7737 7725 -12
- Misses 1375 1394 +19
|
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.
LGTM. @tillig Would you please update CHANGELOG with a note about this?
PS: Probably the same situation in MeterProviderBuilderExtensions
if you also want to update there. But could also be done on a separate PR.
Sure, I can do those, too, np. |
So... possibly slight correction. You don't have an established pattern for how to deal with // TODO: Implement an IDeferredMeterProviderBuilder
// TODO: Handle HttpClientInstrumentationOptions
// SetHttpFlavor - seems like this would be handled by views
// Filter - makes sense for metric instrumentation
// Enrich - do we want a similar kind of functionality for metrics?
// RecordException - probably doesn't make sense for metric instrumentation Which is to say, there are some design things to figure out. If possible, I'd like to punt that to a different PR so I can at least get the tracing side of things out the door. I will work on the changelog, though. |
Totally agree. Thats the reason why the Extensions.Hosting package never reached stable version. (we had different competing proposals, not nothing was settled, and the focus was mostly on metrics, so the plan was to come back to this after metrics/1.2 stable release...) Happy to get more expert opinions on the topic. |
Sure. Would it be good to start that maybe as a discussion over here? I have some ideas based on things like how various .NET "builder" things work as well as |
OK, got |
Fixes #3050.
Changes
Copied the pattern from
AddAspNetCoreInstrumentation
to supportIDeferredTracerProviderBuilder
when innetstandard
. I did notice there's a different options structure fornet461
but I didn't modify that code path. I guessed that the full framework folks weren't usingOptions<T>
and, even if they are, I'm on a Mac in VS Code so I can't really exercise that code path myself.