diff --git a/crates/symbolicator-service/Cargo.toml b/crates/symbolicator-service/Cargo.toml index 02976ee2c..7c0a868ae 100644 --- a/crates/symbolicator-service/Cargo.toml +++ b/crates/symbolicator-service/Cargo.toml @@ -29,7 +29,7 @@ moka = { version = "0.12.1", features = ["future", "sync"] } once_cell = "1.17.1" rand = "0.8.5" reqwest = { version = "0.11.0", features = ["gzip", "brotli", "deflate", "json", "stream", "trust-dns"] } -sentry = { version = "0.32.1", features = ["tracing"] } +sentry = { version = "0.32.1", features = ["tracing", "UNSTABLE_metrics"] } serde = { version = "1.0.137", features = ["derive", "rc"] } serde_json = "1.0.81" serde_yaml = "0.9.14" diff --git a/crates/symbolicator-service/src/metrics.rs b/crates/symbolicator-service/src/metrics.rs index 70e651db5..550fcfb95 100644 --- a/crates/symbolicator-service/src/metrics.rs +++ b/crates/symbolicator-service/src/metrics.rs @@ -57,6 +57,9 @@ macro_rules! metric { $(.with_tag($k, $v))* .send(); }); + ::sentry::metrics::Metric::incr($id.to_string(), $value as f64) + $(.with_tag($k, $v.to_string()))* + .send(); }}; (counter($id:expr) -= $value:expr $(, $k:expr => $v:expr)* $(,)?) => {{ use $crate::metrics::prelude::*; @@ -66,6 +69,9 @@ macro_rules! metric { $(.with_tag($k, $v))* .send(); }); + ::sentry::metrics::Metric::incr($id, -$value as f64) + $(.with_tag($k, $v))* + .send(); }}; // gauges @@ -77,6 +83,9 @@ macro_rules! metric { $(.with_tag($k, $v))* .send(); }); + ::sentry::metrics::Metric::gauge($id, $value as f64) + $(.with_tag($k, $v.to_string()))* + .send(); }}; // timers @@ -88,6 +97,9 @@ macro_rules! metric { $(.with_tag($k, $v))* .send(); }); + ::sentry::metrics::Metric::timing($id.to_string(), $value) + $(.with_tag($k, $v.to_string()))* + .send(); }}; // we use statsd timers to send things such as filesizes as well. @@ -99,6 +111,9 @@ macro_rules! metric { $(.with_tag($k, $v))* .send(); }); + ::sentry::metrics::Metric::distribution($id, $value as f64) + $(.with_tag($k, $v.to_string()))* + .send(); }}; // histograms @@ -110,5 +125,8 @@ macro_rules! metric { $(.with_tag($k, $v))* .send(); }); + ::sentry::metrics::Metric::distribution($id.to_string(), $value as f64) + $(.with_tag($k, $v.to_string()))* + .send(); }}; }