open-telemetry / opentelemetry-dotnet

The OpenTelemetry .NET Client
https://opentelemetry.io
Apache License 2.0
3.07k stars 734 forks source link

[otlp] UseOtlpExporter and AddOtlpExporter extensions don't play nice together #5538

Open CodeBlanch opened 2 months ago

CodeBlanch commented 2 months ago

In 1.8.0 we introduced the UseOtlpExporter extension which will turn on OtlpExporter for all signals. If UseOtlpExporter is called more than once, or AddOtlpExporter is called in addition, exceptions will be thrown:

This was intentionally done but some users have run into issues:

Opening this issue to track the demand for changing the behavior.

liammclennan commented 2 months ago

See https://github.com/open-telemetry/opentelemetry-dotnet/issues/5537