diff --git a/crates/nexus/src/http/dbt/handlers.rs b/crates/nexus/src/http/dbt/handlers.rs index d8221f762..d31badfda 100644 --- a/crates/nexus/src/http/dbt/handlers.rs +++ b/crates/nexus/src/http/dbt/handlers.rs @@ -35,7 +35,7 @@ const SERIALIZATION_FORMAT: &str = "json"; // or "arrow" // For more info see issue #115 const ARROW_IPC_ALIGNMENT: usize = 8; -#[tracing::instrument(level = "debug", skip(state), err, ret(level = tracing::Level::TRACE))] +#[tracing::instrument(level = "debug", skip(state, body), err, ret(level = tracing::Level::TRACE))] pub async fn login( State(state): State, Query(query): Query, @@ -105,7 +105,7 @@ fn records_to_json_string(recs: &[RecordBatch]) -> Result { String::from_utf8(writer.into_inner()).context(dbt_error::Utf8Snafu) } -#[tracing::instrument(level = "debug", skip(state), err, ret(level = tracing::Level::TRACE))] +#[tracing::instrument(level = "debug", skip(state, body), err, ret(level = tracing::Level::TRACE))] pub async fn query( DFSessionId(session_id): DFSessionId, State(state): State, diff --git a/crates/nexus/src/http/session.rs b/crates/nexus/src/http/session.rs index b7ffccf1d..2b6bebebe 100644 --- a/crates/nexus/src/http/session.rs +++ b/crates/nexus/src/http/session.rs @@ -163,21 +163,18 @@ where msg: e.1.to_string(), } })?; - let session_id = match session.get::("DF_SESSION_ID").await { - Ok(Some(id)) => { - tracing::info!("Found session_id: {}", id); - id - } - _ => { - let id = uuid::Uuid::new_v4().to_string(); - tracing::info!("Creating new session_id: {}", id); - session - .insert("DF_SESSION_ID", id.clone()) - .await - .context(SessionPersistSnafu)?; - session.save().await.context(SessionPersistSnafu)?; - id - } + let session_id = if let Ok(Some(id)) = session.get::("DF_SESSION_ID").await { + tracing::debug!("Found DF session_id: {}", id); + id + } else { + let id = uuid::Uuid::new_v4().to_string(); + tracing::debug!("Creating new DF session_id: {}", id); + session + .insert("DF_SESSION_ID", id.clone()) + .await + .context(SessionPersistSnafu)?; + session.save().await.context(SessionPersistSnafu)?; + id }; Ok(Self(session_id)) } diff --git a/crates/nexus/src/http/ui/handlers/tables.rs b/crates/nexus/src/http/ui/handlers/tables.rs index cffb9b81a..d580e12f8 100644 --- a/crates/nexus/src/http/ui/handlers/tables.rs +++ b/crates/nexus/src/http/ui/handlers/tables.rs @@ -366,7 +366,7 @@ pub async fn update_table_properties( (status = 500, description = "Internal server error", body = NexusError) ) )] -#[tracing::instrument(level = "debug", skip(state), err, ret(level = tracing::Level::TRACE))] +#[tracing::instrument(level = "debug", skip(state, multipart), err, ret(level = tracing::Level::TRACE))] pub async fn upload_data_to_table( DFSessionId(session_id): DFSessionId, State(state): State, diff --git a/crates/runtime/src/datafusion/planner.rs b/crates/runtime/src/datafusion/planner.rs index f0b84657b..1b9965e68 100644 --- a/crates/runtime/src/datafusion/planner.rs +++ b/crates/runtime/src/datafusion/planner.rs @@ -67,8 +67,7 @@ where match self.handle_custom_statement(statement.clone()) { Ok(plan) => return Ok(plan), Err(e) => { - // TODO: Tracing - eprintln!("Custom statement parsing skipped: {statement}: {e}"); + tracing::debug!("Custom statement parsing skipped: {} {}", statement, e); } }