Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure AddOtlpExporter can be called multiple times. #99

Open
Mpdreamz opened this issue May 21, 2024 · 0 comments
Open

Ensure AddOtlpExporter can be called multiple times. #99

Mpdreamz opened this issue May 21, 2024 · 0 comments

Comments

@Mpdreamz
Copy link
Member

Right now we add it automatically when calling AddOpenTelemetry() as a cross cutting exporter using UseOtlpExporter().

If later signal specific calls add it using AddOtlpExporter they will get an exception.

Unhandled exception. System.NotSupportedException: Signal-specific AddOtlpExporter methods and the cross-cutting UseOtlpExporter method being invoked on the same IServiceCollect
ion is not supported.

Mpdreamz/opentelemetry-demo@b5ae9bf.

I personally think it be better if this was a NOOP if the AddOtlpExporter does not throw on repeated invocations if the configuration matches the already configured OTLP exporter.

We'll need to investigate if we think this is possible and a good idea and then propose this upstream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant