-
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
[Http Instrumentation] Unify exposed public API #3793
[Http Instrumentation] Unify exposed public API #3793
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #3793 +/- ##
==========================================
- Coverage 87.46% 87.27% -0.20%
==========================================
Files 280 279 -1
Lines 10763 10755 -8
==========================================
- Hits 9414 9386 -28
- Misses 1349 1369 +20
|
src/OpenTelemetry.Instrumentation.Http/HttpClientInstrumentationOptions.cs
Show resolved
Hide resolved
@vishweshbankwar FYI I updated this to include #3792. |
`HttpClientInstrumentationOptions`. It is important to note that there are | ||
differences between .NET Framework and newer .NET/.NET Core runtimes which | ||
govern what options are used. On .NET Framework, `HttpClient` uses the | ||
`HttpWebRequest` API. On .NET & .NET Core, `HttpWebRequest` uses the |
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.
`HttpWebRequest` API. On .NET & .NET Core, `HttpWebRequest` uses the | |
`HttpWebRequest` API. On .NET & .NET Core, `HttpClient` uses the |
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.
If we do this, it will say:
On .NET & .NET Core,
HttpClient
uses theHttpClient
API.
Which is kind of silly 😜
What I was trying to highlight here is the behavior is reversed, depending on the runtime.
- .NET Framework: HttpClient & HttpWebRequest implemented using HttpWebRequest.
- .NET/Core: HttpClient & HttpWebRequest implemented using HttpClient.
Not sure how to best articulate that!
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.
yea i can see this is not easy to articulate. Lets merge this now, and come back to fixing the wording.
Fixes #3434 (really mean it this time)
Relates to #3787
Changes
Exposes the same API for all targets to fix package resolution issues when consuming Http instrumentation into
netstandard2.0
projects.We used to only run HttpWebRequest tests for .NET Framework & HttpClient tests for .NET/Core. Now we run the full suite for all runtimes.
Public API Changes
Not shown: Removed the
AddHttpClientInstrumentation
extensions usingHttpWebRequestInstrumentationOptions
and made the ones usingHttpClientInstrumentationOptions
available toNETFRAMEWORK
targets.TODOs
CHANGELOG.md
updated for non-trivial changes