-
Notifications
You must be signed in to change notification settings - Fork 95
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
Fix ASP.NET Core Traces Instrumentation for .NET7+ #3246
Fix ASP.NET Core Traces Instrumentation for .NET7+ #3246
Conversation
This currently proposed PR should solve the issue, so there is no need to propose a change in the instrumentation library. More details The instrumentation library's behavior varies based on the .NET version in use:
We have already covered this for the metric part, and it does not require any changes. @Kielek Please let me know your thoughts. @vishweshbankwar FYI. |
@rajkumar-rangaraj, please check the whole execution flow in typical, manual/library instrumentation:
I can narrow PR changes to the instrumentation library and apply changes only to HttpInListener (including removing entry in the changelog). It will be sufficient for us, but it will be not sufficient for other similar cases. BTW, all tests in this PR should be green if the changes in the instrumentation library are not necessary. For metrics, it is working as you described. There is no any internal/instrumentation class under the hood. For .NET8+ is is just calling MeterProviderBuilder.AddSource multiple times: https://github.com/open-telemetry/opentelemetry-dotnet/blob/Instrumentation.AspNetCore-1.7.0/src/OpenTelemetry.Instrumentation.AspNetCore/AspNetCoreInstrumentationMeterProviderBuilderExtensions.cs#L22-L39 |
This should be ok if the #else part executes for net7 or greater. Unless you are running in to some specific issue. |
1.7.1 packages released. We have agreed with Raj and Vishwesh that it is locally the best option to proceed. |
Why
Fixes #3212
Replaces: #3231
Handles changes from open-telemetry/opentelemetry-dotnet#3391
Needs changes from open-telemetry/opentelemetry-dotnet#5252
What
Fixes AspNetCore Instrumentation for traces for .NET7.
It is now producing
Microsoft.AspNetCore
as it should.What is more
OpenTelemetry.Instrumentation.AspNetCore
and its dependencies is loaded from additional store. It has to be loaded with dedicated-compiled version for each .NET version.Tests
Modified CI.
Tested locally with library build on open-telemetry/opentelemetry-dotnet#5252
Checklist
CHANGELOG.md
is updated.[ ] Documentation is updated.Newfeatures are covered by tests.