Handle multiple tags in no-op tap macros
This change fixes the no-op tap macros such that they can properly
accept multiple tags.
For example:
counter!(
"my-metric",
1,
"tag1" => tag_value,
"tag2" => tag_value2,
);
@@ -30,7 +30,7 @@ pub mod influx;
#[macro_export]
macro_rules! counter {
($t:tt, $v:expr) => {};
- ($t:tt, $v:expr, $($key:expr => $value:expr)*) => {};
+ ($t:tt, $v:expr, $($key:expr => $value:expr),* $(,)?) => {};
}
/// no-op `gauge` macro for when the `metrics` feature is not enabled
@@ -38,7 +38,7 @@ macro_rules! counter {
#[macro_export]
macro_rules! gauge {
($t:tt, $v:expr) => {};
- ($t:tt, $v:expr, $($key:expr => $value:expr)*) => {};
+ ($t:tt, $v:expr, $($key:expr => $value:expr),* $(,)?) => {};
}
/// no-op `histogram` macro for when the `metrics` feature is not enabled
@@ -46,5 +46,5 @@ macro_rules! gauge {
#[macro_export]
macro_rules! histogram {
($t:tt, $v:expr) => {};
- ($t:tt, $v:expr, $($key:expr => $value:expr)*) => {};
+ ($t:tt, $v:expr, $($key:expr => $value:expr),* $(,)?) => {};
}
