Skip to content

Commit

Permalink
fix: disable sentry's debug-images feature (#375)
Browse files Browse the repository at this point in the history
which produced errors when sentry ingests events

getsentry/sentry-rust#574
  • Loading branch information
pjenvey authored May 5, 2023
1 parent f8e6525 commit ed73097
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion autoconnect/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion autoendpoint/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ async fn main() -> Result<(), Box<dyn Error>> {
let _sentry = sentry::init(sentry::ClientOptions {
release: sentry::release_name!(),
attach_stacktrace: true,
..Default::default()
..autopush_common::sentry::client_options()
});

// Run server...
Expand Down
2 changes: 1 addition & 1 deletion autopush-common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
10 changes: 10 additions & 0 deletions autopush-common/src/sentry.rs
Original file line number Diff line number Diff line change
@@ -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
}
2 changes: 1 addition & 1 deletion autopush/src/server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ impl AutopushServer {
dsn,
sentry::ClientOptions {
release: sentry::release_name!(),
..Default::default()
..autopush_common::sentry::client_options()
},
));
/*
Expand Down

0 comments on commit ed73097

Please sign in to comment.