Fix error logging (#8295)
and some more clickhouse type mismatches, Co-Authored-By: Marshall <marshall@zed.dev> Release Notes: - N/A Co-authored-by: Marshall <marshall@zed.dev>
This commit is contained in:
parent
58fd84308d
commit
c5bb032224
3 changed files with 10 additions and 10 deletions
|
@ -14,10 +14,10 @@ BLOB_STORE_URL = "http://127.0.0.1:9000"
|
||||||
BLOB_STORE_REGION = "the-region"
|
BLOB_STORE_REGION = "the-region"
|
||||||
ZED_CLIENT_CHECKSUM_SEED = "development-checksum-seed"
|
ZED_CLIENT_CHECKSUM_SEED = "development-checksum-seed"
|
||||||
|
|
||||||
CLICKHOUSE_URL = "http://localhost:8123"
|
# CLICKHOUSE_URL = ""
|
||||||
CLICKHOUSE_USER = ""
|
# CLICKHOUSE_USER = "default"
|
||||||
CLICKHOUSE_PASSWORD = ""
|
# CLICKHOUSE_PASSWORD = ""
|
||||||
CLICKHOUSE_DATABASE = "zed"
|
# CLICKHOUSE_DATABASE = "default"
|
||||||
|
|
||||||
# RUST_LOG=info
|
# RUST_LOG=info
|
||||||
# LOG_JSON=true
|
# LOG_JSON=true
|
||||||
|
|
|
@ -425,7 +425,7 @@ pub struct CallEventRow {
|
||||||
release_channel: String,
|
release_channel: String,
|
||||||
|
|
||||||
// ClientEventBase
|
// ClientEventBase
|
||||||
installation_id: Option<String>,
|
installation_id: String,
|
||||||
session_id: Option<String>,
|
session_id: Option<String>,
|
||||||
is_staff: Option<bool>,
|
is_staff: Option<bool>,
|
||||||
time: i64,
|
time: i64,
|
||||||
|
@ -453,7 +453,7 @@ impl CallEventRow {
|
||||||
minor: semver.map(|s| s.minor as i32),
|
minor: semver.map(|s| s.minor as i32),
|
||||||
patch: semver.map(|s| s.patch as i32),
|
patch: semver.map(|s| s.patch as i32),
|
||||||
release_channel: body.release_channel.clone().unwrap_or_default(),
|
release_channel: body.release_channel.clone().unwrap_or_default(),
|
||||||
installation_id: body.installation_id.clone(),
|
installation_id: body.installation_id.clone().unwrap_or_default(),
|
||||||
session_id: body.session_id.clone(),
|
session_id: body.session_id.clone(),
|
||||||
is_staff: body.is_staff,
|
is_staff: body.is_staff,
|
||||||
time: time.timestamp_millis(),
|
time: time.timestamp_millis(),
|
||||||
|
@ -480,7 +480,7 @@ pub struct AssistantEventRow {
|
||||||
time: i64,
|
time: i64,
|
||||||
|
|
||||||
// AssistantEventRow
|
// AssistantEventRow
|
||||||
conversation_id: Option<String>,
|
conversation_id: String,
|
||||||
kind: String,
|
kind: String,
|
||||||
model: String,
|
model: String,
|
||||||
}
|
}
|
||||||
|
@ -506,7 +506,7 @@ impl AssistantEventRow {
|
||||||
session_id: body.session_id.clone(),
|
session_id: body.session_id.clone(),
|
||||||
is_staff: body.is_staff,
|
is_staff: body.is_staff,
|
||||||
time: time.timestamp_millis(),
|
time: time.timestamp_millis(),
|
||||||
conversation_id: event.conversation_id,
|
conversation_id: event.conversation_id.unwrap_or_default(),
|
||||||
kind: event.kind.to_string(),
|
kind: event.kind.to_string(),
|
||||||
model: event.model,
|
model: event.model,
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,7 +64,7 @@ impl IntoResponse for Error {
|
||||||
}
|
}
|
||||||
Error::Database(error) => {
|
Error::Database(error) => {
|
||||||
log::error!(
|
log::error!(
|
||||||
"HTTP error {}: {}",
|
"HTTP error {}: {:?}",
|
||||||
StatusCode::INTERNAL_SERVER_ERROR,
|
StatusCode::INTERNAL_SERVER_ERROR,
|
||||||
&error
|
&error
|
||||||
);
|
);
|
||||||
|
@ -72,7 +72,7 @@ impl IntoResponse for Error {
|
||||||
}
|
}
|
||||||
Error::Internal(error) => {
|
Error::Internal(error) => {
|
||||||
log::error!(
|
log::error!(
|
||||||
"HTTP error {}: {}",
|
"HTTP error {}: {:?}",
|
||||||
StatusCode::INTERNAL_SERVER_ERROR,
|
StatusCode::INTERNAL_SERVER_ERROR,
|
||||||
&error
|
&error
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue