diff options
Diffstat (limited to 'crates/trc/src/macros.rs')
-rw-r--r-- | crates/trc/src/macros.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/crates/trc/src/macros.rs b/crates/trc/src/macros.rs index 32b55e8a..d50b26da 100644 --- a/crates/trc/src/macros.rs +++ b/crates/trc/src/macros.rs @@ -24,9 +24,10 @@ macro_rules! error { let err = $err; let event_id = err.as_ref().id(); - if $crate::collector::Collector::has_interest(event_id) - || $crate::collector::Collector::is_metric(event_id) - { + if $crate::collector::Collector::is_metric(event_id) { + $crate::collector::Collector::record_metric(*err.as_ref(), event_id, &err.keys); + } + if $crate::collector::Collector::has_interest(event_id) { err.send(); } }; |