penumbra_stake::component::metrics

Function set_global_recorder

pub fn set_global_recorder<R>(recorder: R) -> Result<(), SetRecorderError<R>>
where R: Recorder + 'static,
Available on crate feature component only.
Expand description

Sets the global recorder.

This function may only be called once in the lifetime of a program. Any metrics recorded before this method is called will be completely ignored.

This function does not typically need to be called manually. Metrics implementations should provide an initialization method that installs the recorder internally.

ยงErrors

An error is returned if a recorder has already been set.