-
Notifications
You must be signed in to change notification settings - Fork 772
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
Bump Microsoft.Extensions.Logging to net8 - part 2 #4933
Bump Microsoft.Extensions.Logging to net8 - part 2 #4933
Conversation
Codecov Report
@@ Coverage Diff @@
## main #4933 +/- ##
=========================================
+ Coverage 0 83.48% +83.48%
=========================================
Files 0 295 +295
Lines 0 12325 +12325
=========================================
+ Hits 0 10290 +10290
- Misses 0 2035 +2035
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@reyang, AutoInstrumentation suffers for each dependency bump in OTel SDK/APi/Instrumentation/Contrib packages. It includes For .NET Framework, using profiler api, we have pretty good solution for redirecting used library versions to the latest from the release time. While library loading we check if it is on special list. If so, our version is loaded: List of libraries is avilable under https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/blob/v1.0.2/src/OpenTelemetry.AutoInstrumentation.Native/netfx_assembly_redirection.h. This option is not available for .NET6+. I have found realistic scenario to illustrate the issue. Please check TestApplication.GrpcNetClient referencing Grpc.Net.Client 2.56.0 2.56.0 and older versions of Grpc.Net.Client references Microsoft.Extensions.Logging.Abstractions (>= 3.0.3). When you want to use it with Automatic Instrumentation it leads to
The older version library is loaded from the application directory instead of additional store provided by automatic instrumentation distribution. If you decide to make a bump of the In previous PR, you have asked if runtime team can help here, probably yes, but it requires changes in the runtime probably. I am not sure if .NET team has a plan to extend additional store functionalities. Important references: .NET related env. configured for this scenario:
I remember that we have a automatic instrumentation nuget package to mitigate the issue, but it is not always feasible. |
What's the direction of OpenTelemetry .NET auto-instrumentation? Is there a proposed solution, or the SIG feels stuck and doesn't have a clue how to address this type of issue? In #4920 (review), @Kielek you mentioned:
The way I look at these problems:
|
I have written from top of my head. and I have made a mistake. Sorry. I will rise the topic on .NET Auto SIG in few minutes. |
Update from the .NET Auto SIG: We've decided not to block any important package updates that occur in the SDK space. Auto-Instrumentation will implement a workaround to address the assembly load issue. Furthermore, we are exploring the possibility of a new design that might allow auto-instrumentation to overcome assembly load issues caused by package updates from the SDK. |
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 PR LGTM and it is fine to merge.
One thing we talked about on the SIG IIRC was that we wanted to release a 1.7.0 alpha which contained the OTLP changes to reintroduce log category name, eventId, & exception details before we took dependencies on anything from .NET 8. I don't know if we had really strong reasons why we wanted to do that other than it just seemed like a nice friendly thing to do for consumers 🤷 Just bringing it up here as a reminder.
Would you elaborate what's the thinking behind this (not taking any .NET 8 dependencies in 1.7.0-alpha)? |
I believe we were considering doing one more stable release prior to .net 8 releasing. However at this point with .net 8 only about a month away, I doubt that makes sense anymore. I think it's safe to commit to releasing our next stable after .net 8. |
I want to double click on the thinking behind holding changes for alpha releases - here is my understanding:
|
Fixed #3205.
Follow up #4920.
Related to #4902.
Changes
Microsoft.Extensions.Logging
dependency to OpenTelemetry SDK.Microsoft.Extension.Logging
dependency from other projects since they are now getting the correct version from the SDK dependency.Microsoft.Extensions.Logging
version 8 and the transient dependencies raised bar for static analysis).