mirror of
https://github.com/flibusta-apps/batch_downloader.git
synced 2025-12-06 14:25:36 +01:00
Fix
This commit is contained in:
@@ -19,7 +19,7 @@ pub struct Config {
|
||||
pub cache_api_key: String,
|
||||
pub cache_url: String,
|
||||
|
||||
// pub sentry_dsn: String
|
||||
pub sentry_dsn: String
|
||||
}
|
||||
|
||||
impl Config {
|
||||
@@ -38,7 +38,7 @@ impl Config {
|
||||
cache_api_key: get_env("CACHE_API_KEY"),
|
||||
cache_url: get_env("CACHE_URL"),
|
||||
|
||||
// sentry_dsn: get_env("SENTRY_DSN")
|
||||
sentry_dsn: get_env("SENTRY_DSN")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
12
src/main.rs
12
src/main.rs
@@ -3,7 +3,8 @@ pub mod config;
|
||||
pub mod services;
|
||||
pub mod structures;
|
||||
|
||||
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;
|
||||
@@ -11,6 +12,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()
|
||||
|
||||
Reference in New Issue
Block a user