diff --git a/autoconnect/src/main.rs b/autoconnect/src/main.rs index 9f772002c..687ae5478 100644 --- a/autoconnect/src/main.rs +++ b/autoconnect/src/main.rs @@ -77,7 +77,7 @@ async fn main() -> Result<()> { release: sentry::release_name!(), session_mode: sentry::SessionMode::Request, // new session per request auto_session_tracking: true, - ..Default::default() + ..autopush_common::sentry::client_options() }); let port = settings.port; diff --git a/autoendpoint/src/main.rs b/autoendpoint/src/main.rs index 2f35a047f..047f0e8f8 100644 --- a/autoendpoint/src/main.rs +++ b/autoendpoint/src/main.rs @@ -49,7 +49,7 @@ async fn main() -> Result<(), Box> { let _sentry = sentry::init(sentry::ClientOptions { release: sentry::release_name!(), attach_stacktrace: true, - ..Default::default() + ..autopush_common::sentry::client_options() }); // Run server... diff --git a/autopush-common/src/lib.rs b/autopush-common/src/lib.rs index 0f65564ed..0e8f37563 100644 --- a/autopush-common/src/lib.rs +++ b/autopush-common/src/lib.rs @@ -12,7 +12,7 @@ pub mod errors; pub mod logging; pub mod metrics; pub mod notification; -// pending actix 4: +pub mod sentry; pub mod tags; #[macro_use] diff --git a/autopush-common/src/sentry.rs b/autopush-common/src/sentry.rs new file mode 100644 index 000000000..d890ac296 --- /dev/null +++ b/autopush-common/src/sentry.rs @@ -0,0 +1,10 @@ +/// Return a `sentry::::ClientOptions` w/ the `debug-images` integration +/// disabled +pub fn client_options() -> sentry::ClientOptions { + // debug-images conflicts w/ our debug = 1 rustc build option: + // https://github.com/getsentry/sentry-rust/issues/574 + let mut opts = sentry::apply_defaults(sentry::ClientOptions::default()); + opts.integrations.retain(|i| i.name() != "debug-images"); + opts.default_integrations = false; + opts +} diff --git a/autopush/src/server/mod.rs b/autopush/src/server/mod.rs index fdadc5497..44e225ac1 100644 --- a/autopush/src/server/mod.rs +++ b/autopush/src/server/mod.rs @@ -89,7 +89,7 @@ impl AutopushServer { dsn, sentry::ClientOptions { release: sentry::release_name!(), - ..Default::default() + ..autopush_common::sentry::client_options() }, )); /*