diff --git a/Cargo.toml b/Cargo.toml index 100cb71..9d75400 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,7 +24,7 @@ tokio-util = { version = "0.7.8", features = ["compat"] } axum = { version = "0.6.18", 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 f09c320..9dcec19 100644 --- a/src/main.rs +++ b/src/main.rs @@ -4,7 +4,8 @@ pub mod prisma; pub mod views; pub mod services; -use std::net::SocketAddr; +use std::{net::SocketAddr, str::FromStr}; +use sentry::{ClientOptions, types::Dsn, integrations::debug_images::DebugImagesIntegration}; use tracing::info; use crate::views::get_router; @@ -12,6 +13,15 @@ use crate::views::get_router; #[tokio::main] async fn main() { + 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); + tracing_subscriber::fmt() .with_target(false) .compact()