Skip to content

Commit

Permalink
fix: Clean up nested ingest span logging
Browse files Browse the repository at this point in the history
  • Loading branch information
QuentinMoss committed Jul 1, 2023
1 parent 49a8521 commit 4ed89e5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<Client>,
Extension(pool): Extension<SqlitePool>,
req: Request<Body>,
) -> StdResult<impl IntoResponse, AppError> {
let span = tracing::span!(Level::TRACE, "ingest");
let _enter = span.enter();

let method = req.method().to_string();
let uri = req.uri().to_string();
Expand Down

0 comments on commit 4ed89e5

Please sign in to comment.