From fa031af0957c727656df62f9b73c74421414a852 Mon Sep 17 00:00:00 2001 From: Pavel Perestoronin Date: Sun, 18 Jul 2021 14:13:24 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=8A=20Set=20`app`=20in=20Sentry?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/crawler.rs | 1 + src/web.rs | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9270792c..c31b1907 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -235,7 +235,7 @@ dependencies = [ [[package]] name = "blitz-dashboard" -version = "0.10.0" +version = "0.10.1" dependencies = [ "anyhow", "chrono", diff --git a/Cargo.toml b/Cargo.toml index 5674d2bc..73f14dee 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "blitz-dashboard" -version = "0.10.0" +version = "0.10.1" authors = ["Pavel Perestoronin "] edition = "2018" resolver = "2" diff --git a/src/crawler.rs b/src/crawler.rs index 86c65f6e..0ceb393e 100644 --- a/src/crawler.rs +++ b/src/crawler.rs @@ -23,6 +23,7 @@ enum CrawlMode { impl Crawler { pub async fn run(api: WargamingApi, opts: CrawlerOpts) -> crate::Result { + sentry::configure_scope(|scope| scope.set_tag("app", "crawler")); let database = crate::database::open(&opts.database).await?; let crawler = Self { api, database }; loop { diff --git a/src/web.rs b/src/web.rs index b3b48a22..bb476a8a 100644 --- a/src/web.rs +++ b/src/web.rs @@ -22,6 +22,7 @@ mod routes; /// Run the web app. pub async fn run(api: WargamingApi, opts: WebOpts) -> crate::Result { + sentry::configure_scope(|scope| scope.set_tag("app", "web")); log::info!("Listening on {}:{}.", opts.host, opts.port); rocket::custom(to_config(&opts)?) .manage(AccountInfoCache::new(api.clone()))