sum_sample

Macro sum_sample 

Source
sum_sample!() { /* proc-macro */ }
Expand description

Emit a metric sample with sum as its aggregation.

§Examples

See sample.

§Syntax

(control_param),*

where

  • control_param: A Rust field-value with a pre-determined identifier (see below).

§Control parameters

This macro accepts the following optional control parameters:

nametypedescription
rtimpl emit::runtime::RuntimeThe runtime to emit the metric sample through if sampler is unspecified.
samplerimpl emit::sampler::SamplerThe Sampler to pass the metric sample to.
mdlimpl Into<emit::Path>The module the metric sample belongs to. If unspecified the current module path is used.
extentimpl emit::ToExtentThe extent to use on the metric sample. If unspecified the extent is left empty.
propsimpl emit::PropsA set of properties to add to the metric sample.
value (required)impl emit::ToValueThe value of the metric sample. If the value is an identifier then name will be inferred to be that identifier.
name (required if value is not an identifier)impl emit::ToStrThe name of the metric being sampled. If unspecified, and value is an identifier, then the stringified identifier is used as the name.
aggimpl emit::ToStrThe aggregation of the metric sample. If unspecified, the default for the macro is used.