diff --git a/Cargo.toml b/Cargo.toml index e684562..710c183 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,7 +20,7 @@ tokio = { version = "1.29.1", features = ["full"] } axum = { version = "0.6.19", features = ["json"] } axum-prometheus = "0.4.0" chrono = "0.4.26" -sentry = "0.31.5" +sentry = { version = "0.31.5", features = ["debug-images"] } tracing = "0.1.37" tracing-subscriber = { version = "0.3.17", features = ["env-filter"]} diff --git a/src/main.rs b/src/main.rs index b11b196..662879e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,9 +3,10 @@ pub mod prisma; pub mod views; pub mod db; +use sentry::{ClientOptions, types::Dsn, integrations::debug_images::DebugImagesIntegration}; use tracing::info; -use std::net::SocketAddr; +use std::{net::SocketAddr, str::FromStr}; async fn start_app() { @@ -28,7 +29,14 @@ async fn main() { .compact() .init(); - let _guard = sentry::init(config::CONFIG.sentry_dsn.clone()); + let options = ClientOptions { + dsn: Some(Dsn::from_str(&config::CONFIG.sentry_dsn).unwrap()), + default_integrations: false, + ..Default::default() + } + .add_integration(DebugImagesIntegration::new()); + + let _guard = sentry::init(options); start_app().await; }