Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: disable sentry's debug-images feature #1499

Merged
merged 1 commit into from
Nov 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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