Attribute Macro metriki_core::metered

source · []
#[metered]
This is supported on crate feature macros only.
Expand description

metered attribute adds a meter to current function.

Available options:

  • registry: the code to access MetricsRegistry. global_registry() by default.
  • name: name for the timer metric. Function name is used by default, be careful with name conflict in different module because the macro cannot detect the module name.