Skip to content

Commit

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

getsentry/sentry-rust#574

SYNC-4023
  • Loading branch information
pjenvey authored Nov 21, 2023
1 parent 59283b5 commit 8d9185e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion syncserver/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,24 @@ async fn main() -> Result<(), Box<dyn Error>> {
let settings = Settings::with_env_and_config_file(args.flag_config.as_deref())?;
init_logging(!settings.human_logs).expect("Logging failed to initialize");
debug!("Starting up...");

// Set SENTRY_DSN environment variable to enable Sentry.
// Avoid its default reqwest transport for now due to issues w/
// likely grpcio's boringssl
let curl_transport_factory = |options: &sentry::ClientOptions| {
Arc::new(sentry::transports::CurlHttpTransport::new(options)) as Arc<dyn sentry::Transport>
};
let _sentry = sentry::init(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 {
// Note: set "debug: true," to diagnose sentry issues
transport: Some(Arc::new(curl_transport_factory)),
release: sentry::release_name!(),
..sentry::ClientOptions::default()
});
opts.integrations.retain(|i| i.name() != "debug-images");
opts.default_integrations = false;
let _sentry = sentry::init(opts);

// Setup and run the server
let banner = settings.banner();
Expand Down

0 comments on commit 8d9185e

Please sign in to comment.