I am using the 1.0.0-rc4 of OpenTelemetry.Extensions.Hosting. I'm trying to add redis instrumentation, but for that I need an instance of IConnectionMultiplexer. In some examples, I have seen that it can be resolved from the service provider by using the following overload of AddOpenTelemetryTracing:
services.AddOpenTelemetryTracing((serviceProvider, builder) =>
{
builder.AddRedisInstrumentation(serviceProvider.GetRequiredService<IConnectionMultiplexer>());
}
However, this overload has disappeared in rc-4, while it was present in rc-3.
Maybe this can be solved with #2011
I see that this overload was dropped in #1889 in favor of
services.AddOpenTelemetryTracing(builder =>
{
builder.configure((serviceProvider, builder) =>
{
//Use the service provider here to add additional configuration to the builder
});
});
Personally, I find the previous overload of AddOpenTelemetryTracing useful, and more easily discoverable.
Anyway, if this is the new way to go, it would be useful to add examples of how to achieve this in the documentation.
Most helpful comment
I see that this overload was dropped in #1889 in favor of
Personally, I find the previous overload of
AddOpenTelemetryTracinguseful, and more easily discoverable.Anyway, if this is the new way to go, it would be useful to add examples of how to achieve this in the documentation.