Sdk.CreateMeterProviderBuilder
vs IServiceCollection.AddOpenTelemetryMetrics
#3738
-
What is the practical difference between calling I'm curious because I have an ASP.NET Core web service that needs to export different types of metrics to different locations. i.e. I need to have multiple separate metrics pipelines within the same app. Calling |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
No functional differences. AddOpenTelemetryMetrics is more natural to asp.net core users. |
Beta Was this translation helpful? Give feedback.
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.