set_global_default

Function set_global_default 

Source
pub fn set_global_default(client: StatsdClient)
Expand description

Set the global default StatsdClient instance

If the global default client has already been set, this method does nothing.

ยงExample

use cadence::{StatsdClient, NopMetricSink};
let client = StatsdClient::from_sink("my.prefix", NopMetricSink);

cadence_macros::set_global_default(client);