Open LynnLi11 opened 4 months ago
@LynnLi11,
I think that you could try to use method described in https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/Instrumentation.AspNet-1.8.0-beta.1/src/OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule/README.md#textmappropagator
There is a static property you could set (when the OTel registration complete) by
TelemetryHttpModule.Options.TextMapPropagator = new CompositeTextMapPropagator(/* put something here */)
I didn't check with older version than 1.8.0-beta.1, but I suppose that it was not changed (but consider upgrading your packages).
Issue with OpenTelemetry.Instrumentation.AspNet
List of all OpenTelemetry NuGet packages and version that you are using (e.g.
OpenTelemetry 1.3.2
):Runtime version (e.g.
net462
,net48
,net6.0
,net7.0
etc. You can find this information from the*.csproj
file): net472Is this a feature request or a bug?
What is the expected behavior?
ServiceProvider serviceProvider = s.BuildServiceProvider(); var hostedServices = serviceProvider.GetServices();
foreach (var hostedService in hostedServices)
{
_ = hostedService.StartAsync(CancellationToken.None);
}
Then I get the expected behavior.
Is there any possibility that AspNet Intstrumentation would not rely on the default propagator? Or providing a way to reset the propagator specially for
HttpTelemetryModule
?