From 1954a9719428eec0457069a17dcfb70e3043488f Mon Sep 17 00:00:00 2001 From: OMGeeky Date: Mon, 6 May 2024 18:30:38 +0200 Subject: [PATCH] better logging --- src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index a43b8fb..8033afd 100644 --- a/src/main.rs +++ b/src/main.rs @@ -53,6 +53,7 @@ async fn post_notify_inner(req_body: String, data: web::Data) -> Resul } } +#[instrument(skip(webhook_url))] async fn notify_webhook( webhook_url: &str, req_body: &NotificationWebhookMessage, @@ -71,8 +72,9 @@ async fn notify_webhook( .map_err(|e| format!("Could not notify webhook (text response): {e}")) } #[actix_web::main] +#[instrument] async fn main() -> std::io::Result<()> { - let _guard = init_tracing("twba_common"); + let _guard = init_tracing("twba_notifier"); HttpServer::new(|| { App::new() .app_data(web::Data::new(AppState {