Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions crates/nexus/src/http/dbt/handlers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<AppState>,
Query(query): Query<LoginRequestQuery>,
Expand Down Expand Up @@ -105,7 +105,7 @@ fn records_to_json_string(recs: &[RecordBatch]) -> Result<String, DbtError> {
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<AppState>,
Expand Down
27 changes: 12 additions & 15 deletions crates/nexus/src/http/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,21 +163,18 @@ where
msg: e.1.to_string(),
}
})?;
let session_id = match session.get::<String>("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::<String>("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))
}
Expand Down
2 changes: 1 addition & 1 deletion crates/nexus/src/http/ui/handlers/tables.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<AppState>,
Expand Down
3 changes: 1 addition & 2 deletions crates/runtime/src/datafusion/planner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down
Loading