Skip to content

Is It Allowed to Add Multiple MeterProvider in OpenTelemetry .NET #6134

Closed Answered by cijothomas
huapeng-zhang asked this question in Q&A
Discussion options

You must be logged in to vote

Yes it is allowed. Each MeterProvider creates a PeriodicReader, which creates a new Thread.. If you don't mind that extra need, this is totally fine.
(Make you don't end up creating a MeterProvider per metric emission. They are fairly big objects, so create-once-re-use-till-end should be followed, but having multiple is just fine.)

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@huapeng-zhang
Comment options

@cijothomas
Comment options

Answer selected by huapeng-zhang
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