Skip to content

Conversation

@stevejgordon
Copy link
Contributor

We initially used UseOtlpExporter as a convenient way to enable OTLP export by default globally for all signals. However, this plays poorly with the AddOtlpExporter methods, which throw if called by consumer code. This change avoids that risk. It also introduces a LoggingProviderBuilder extension to register our defaults, which our main builder calls.

We still support disabling our default registration of the OTLP exporter via an environment variable, which the auto instrumentation plugin then passes when configuring the providers.

This PR also fixes a small typo in the docs.

Closes #177

We originally used UseOtlpExporter as a nice way to globally enable
OTLP export by default for all signals. However, this doesn't play well
with the AddOtlpExporter methods which then throw if called by consumer
code. This change avoids that risk. It also introduces a LoggingProviderBuilder
extension to register our defaults which our main builder calls.
@stevejgordon stevejgordon requested a review from a team November 21, 2024 15:30
trentm
trentm previously approved these changes Nov 21, 2024
@stevejgordon stevejgordon requested a review from trentm November 21, 2024 19:16
@stevejgordon stevejgordon merged commit 107db01 into main Nov 22, 2024
5 checks passed
@stevejgordon stevejgordon deleted the otlp-exporter branch November 22, 2024 05:25
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

Successfully merging this pull request may close these issues.

Refactor use of UseOtlpExporter

3 participants