This commit is contained in:
2023-08-10 21:20:37 +02:00
parent 3a587c9d24
commit b8c70e0586
2 changed files with 11 additions and 3 deletions

View File

@@ -20,7 +20,7 @@ tokio = { version = "1.28.2", features = ["full"] }
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"]}

View File

@@ -3,9 +3,10 @@ pub mod db;
pub mod prisma;
pub mod views;
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() {
let app = views::get_router().await;
@@ -27,7 +28,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;
}