From cb6de75a26b570a2db4c43a38d1e4da990b7ed06 Mon Sep 17 00:00:00 2001 From: Bulat Kurbanov Date: Thu, 10 Aug 2023 21:18:25 +0200 Subject: [PATCH] Fix --- src/main.rs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 372c944..311f7ff 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2,10 +2,11 @@ pub mod config; 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, config::CONFIG}; +use crate::views::get_router; #[tokio::main] @@ -15,7 +16,14 @@ async fn main() { .compact() .init(); - let _guard = sentry::init(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); let addr = SocketAddr::from(([0, 0, 0, 0], 8080));