Skip to content

GetTracerProvider returns NoopTracerProvider #3561

Answered by MrAlias
aaronjheng asked this question in Q&A
Discussion options

You must be logged in to vote

However, there is always a global trace provider registered.

That is not guaranteed. If you do not explicitly call SetTracerProvider no global tracer provider is registered, a noop will be returned in this case.

If you would explicitly like a NoopTracerProvider you can create one with NewNoopTracerProvider.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@aaronjheng
Comment options

@MrAlias
Comment options

@aaronjheng
Comment options

Answer selected by aaronjheng
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants