-
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
Moving IDeferredTracerProviderBuilder to API #2058
Moving IDeferredTracerProviderBuilder to API #2058
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2058 +/- ##
==========================================
- Coverage 84.52% 83.32% -1.20%
==========================================
Files 187 189 +2
Lines 6092 6184 +92
==========================================
+ Hits 5149 5153 +4
- Misses 943 1031 +88
|
src/OpenTelemetry.Extensions.Hosting/Implementation/TracerProviderBuilderHosting.cs
Outdated
Show resolved
Hide resolved
Isn't this going to mean that all existing extensions on |
Depends.
Should we just take a dependency on Microsoft.Extensions.DependencyInjection.Abstractions in the API project? Maybe! Looking to @cijothomas for his thoughts. No net452 target on there so we will likely introduce issues where things compile strangely on .NET Framework because it picks net452 lib instead of netstandard2.0. |
|
||
IEnumerator IEnumerable.GetEnumerator() => this.GetEnumerator(); | ||
|
||
private static DeferredServiceDescriptor ConvertToOtel(ServiceDescriptor serviceDescriptor) |
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.
Rename the methods to ConvertToDeferredServiceDescriptor
and ConvertToDIServiceDescriptor
?
I really wish you guys would just take a dep on ServiceProvider and Logging. I know there is some issue for supporting some really far back .NET version, but you are building the future of telemetry for .NET apps and a very large price is being paid for supporting a framework that is extremely unlikely to be used in combination with this lib. Nobody builds new apps on old frameworks and nobody would retrofit something like Otel on an app that can't even be upgraded to a slightly newer framework version. |
return new DeferredServiceDescriptor(serviceDescriptor.ServiceType, serviceDescriptor.ImplementationType, lifetime); | ||
} | ||
|
||
private static DeferredServiceLifetime ConvertToOtel(ServiceLifetime serviceLifetime) |
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.
Rename the methods to ConvertToDeferredServiceLifetime
and ConvertToDIServiceLifetime
?
As discussed offline and in today SIG meeting:
|
Related to #1889
Changes
Moved IDeferredTracerProviderBuilder from SDK to API. The goal is to allow instrumentation libraries to be written without a dependency on SDK.
Public API
API doesn't have a dependency on Microsoft.Extensions.DependencyInjection so IDeferredTracerProviderBuilder can no longer simply expose
IServiceCollection
.TODOs
CHANGELOG.md
updated for non-trivial changes