-
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
[Traces] Support named options in HttpClient instrumentation #3664
[Traces] Support named options in HttpClient instrumentation #3664
Conversation
@@ -2,12 +2,17 @@ | |||
|
|||
<PropertyGroup> | |||
<!-- OmniSharp/VS Code requires TargetFrameworks to be in descending order for IntelliSense and analysis. --> | |||
<TargetFrameworks>netstandard2.0;net462</TargetFrameworks> | |||
<TargetFrameworks>net6.0;net462</TargetFrameworks> |
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.
@alanwest @utpilla @cijothomas Hey I dropped netstandard2.0
and added net6.0
. The netstandard2.0
didn't really make sense to me. We've seen users reference this in netstandard2.0
projects which then blow up when consumed into net462
projects because the API is different. Seems like this is a safer way to go about things?
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.
This would resolve #3434. Technically, this is sort of a breaking change.
I suspect that the use of the HttpClient instrumentation is pretty ubiquitous. Given that this change will require .NET Framework users who have shared netstandard libraries to retarget their libraries, I think we may as well rip the bandaid off and remove netstandard targets from all our packages.
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.
agree with this change to HttpClientInstrumenttion.
Those consuming this via shared library will see breakage, unless the shared library also updates their target.
Those consuming this directly from app (like a Asp.Net or Asp.Net core) app should see no breakage.
Changing ns20 target from API/SDK packages should be discussed separately, as those are stable packages, unlike httpclient instrumentation.
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 merged this. Felt like it was good to get it in, get it out there, see if we get any feedback.
This change would have also worked:
<TargetFrameworks>netstandard2.1;net462</TargetFrameworks>
Because .NET Framework does not implement .NET Standard 2.1, users would get the correct version in that case.
Not sure which is the best way to go.
- We don't have
netstandard2.1
in AspNetCore instrumentation currently. - We do have
netstandard2.0
in API+SDK andnetstandard2.1
in SDK.
If our goal is to drop support for <net6.0 we should maybe just go to <TargetFrameworks>net6.0;net462</TargetFrameworks>
across the board. It will be bumpy, but clear. Otherwise perhaps we should keep netstandard2.1
in HttpClient + AspNetCore.
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #3664 +/- ##
==========================================
+ Coverage 87.54% 87.62% +0.08%
==========================================
Files 283 283
Lines 10283 10286 +3
==========================================
+ Hits 9002 9013 +11
+ Misses 1281 1273 -8
|
Resolves #3434
Changes
netstandard2.0
target and addsnet6.0
.TODOs
CHANGELOG.md
updated for non-trivial changes