Skip to content

'static metrics::set_recorder(..) and metrics::Recorder trait #382

Answered by tobz
BMorinDrifter asked this question in Q&A
Discussion options

You must be logged in to vote

Just store Vec<Arc<AtomicU64>> and get a clone of them when creating the handles in register_counter, etc. There's no need to do anything with &'static.

Replies: 4 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

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

Answer selected by BMorinDrifter
Comment options

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