Skip to content

best practices : should we reuse the instruments ? #2783

Closed Answered by cijothomas
antonmithun-work asked this question in Q&A
Discussion options

You must be logged in to vote

Create once and re-use. If not easy to pass around the created instance, clone and share. (Cloning is cheap and will point to the same underlying Metric).

https://github.com/open-telemetry/opentelemetry-rust/blob/main/opentelemetry/src/metrics/instruments/histogram.rs#L7-L11

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by antonmithun-work
Comment options

You must be logged in to vote
0 replies
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