From 9211eabeb64df45bd12dd887eab639964973ee4b 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 | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 0c6c6e6..22b13b4 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,14 +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(); let headers = transform_headers(req.headers());