macro_rules! metric {
    (
        name: $name:expr,
        label: $label:expr
        $( , $field:ident: $value:expr )* $(,)?
    ) => { ... };
    ($($_:tt)*) => { ... };
}
Expand description

Builds a new Metric.

use mackerel_plugin::metric;

let metric = metric! {
    name: "foo",
    label: "Foo metric",
};

You can also specify stacked and diff options.

use mackerel_plugin::metric;

let metric = metric! {
    name: "foo",
    label: "Foo metric",
    stacked: true,
    diff: true,
};