Report response latency and errors when using (inline) assistant (#11806)
Release Notes: - N/A Co-authored-by: Nathan <nathan@zed.dev> Co-authored-by: David <davidsp@anthropic.com>
This commit is contained in:
parent
de09409f01
commit
9f0a20241b
5 changed files with 171 additions and 119 deletions
|
@ -785,6 +785,8 @@ pub struct AssistantEventRow {
|
|||
conversation_id: String,
|
||||
kind: String,
|
||||
model: String,
|
||||
response_latency_in_ms: Option<i64>,
|
||||
error_message: Option<String>,
|
||||
}
|
||||
|
||||
impl AssistantEventRow {
|
||||
|
@ -811,6 +813,10 @@ impl AssistantEventRow {
|
|||
conversation_id: event.conversation_id.unwrap_or_default(),
|
||||
kind: event.kind.to_string(),
|
||||
model: event.model,
|
||||
response_latency_in_ms: event
|
||||
.response_latency
|
||||
.map(|latency| latency.as_millis() as i64),
|
||||
error_message: event.error_message,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue