open-telemetry/opentelemetry-dotnet

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

Open

#5,538 opened on Apr 16, 2024

 (4 comments) (5 reactions) (0 assignees)C# (889 forks)auto 404
help wantedpkg:OpenTelemetry.Exporter.OpenTelemetryProtocol

Repository metrics

Stars
 (3,725 stars)
PR merge metrics
 (Avg merge 3d 17h) (112 merged PRs in 30d)

Description

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.

Contributor guide