Replies: 1 comment 4 replies
-
Could you share how you're trying to do that that isn't working? You should be able to do that like this. Or is it just that you want DI integration but also don't want
What we do is a pretty-standard pattern in modern .NET applications. Lots of ASP.NET Core is built on the same The hosting package adds OTel into the var sdk = OpenTelemetrySdk.Create(...);
builder.Services.AddSingleton<ILoggerFactory>(sdk.GetLoggerFactory());If you share some more context about your specific use case we can maybe provide some suggestions. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, is there a way to suppress the SDK to have any access to my applications
IConfiguration?I would've used the
OpenTelemetrySdk.Createmethod that separates OTEL from my applications container, but then I'm not able to forward logging fromMicrosoft.Extensions.Logging.ILogger<T>into the OTEL SDK.I don't understand why using
IConfigurationto set up the pipeline is not an explicit choice left to the developer, since you're already using theIOptionspattern, which can easily be configured by the library user according to his needs.Beta Was this translation helpful? Give feedback.
All reactions