Skip to content

Sdk.CreateMeterProviderBuilder vs IServiceCollection.AddOpenTelemetryMetrics #3738

Answered by cijothomas
MatisseHack asked this question in Q&A
Discussion options

You must be logged in to vote

No functional differences. AddOpenTelemetryMetrics is more natural to asp.net core users.
AddOpenTelemetryMetrics is only capable of a single pipeline. If you need multiple providers (with diff. configs), then use Sdk.Create builder approach, and add it to DI by hand would be recommended.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@MatisseHack
Comment options

Answer selected by MatisseHack
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