From 4ed89e59190d404fbd1ce665f8dbe1efda4815a0 Mon Sep 17 00:00:00 2001 From: Quentin Moss Date: Fri, 30 Jun 2023 21:03:59 -0700 Subject: [PATCH] fix: Clean up nested ingest span logging --- src/lib.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 0c6c6e6..9efc1bf 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -17,7 +17,6 @@ use axum::{routing::post, Router}; use hyper::HeaderMap; use serde::Deserialize; use sqlx::sqlite::SqlitePool; -use tracing::Level; use crate::db::{ensure_schema, insert_request, mark_complete, mark_error}; use crate::error::AppError; @@ -56,13 +55,12 @@ pub async fn app(config: Config) -> Result<(Router, Router, SqlitePool)> { Ok((router, mgmt_router, pool2)) } +#[tracing::instrument(level = "trace", "ingest", skip_all)] async fn handler( State(client): State, Extension(pool): Extension, req: Request, ) -> StdResult { - let span = tracing::span!(Level::TRACE, "ingest"); - let _enter = span.enter(); let method = req.method().to_string(); let uri = req.uri().to_string();