What is the motivation behind only allowing a single TraceProvider in the IServiceCollection? #6002
Replies: 1 comment
-
Hi @solidyellowstudio, you can create multiple TracerProviders There are two APIs available get configuring OpenTelemetry in your application. Both of these are in that doc.
|
Beta Was this translation helpful? Give feedback.
-
The opentelemetry documentation for customizing the sdk has the following note.
In the same documentation, another area mentions the
Sdk.CreateTraceProviderBuilder()
is available in scenarios where multiple providers are required.The motivation for my questions is that I want to add multiple trace providers to a .NET Aspire application, so I can send a specific set of traces and logs to a different OTEL application for analysis, while still maintaining the .NET Aspire standalone dashboard experience.
Are the statements in the documentation in conflict with each other or am I interpreting them incorrectly ?
Is there a different approach I should consider to send traces to multiple or different OTEL backends ?
Beta Was this translation helpful? Give feedback.
All reactions