telemetry: Add language_name
and model_provider
(#18640)
This PR adds a bit more metadata for assistant logging. Release Notes: - Assistant: Added `language_name` and `model_provider` fields to telemetry events. --------- Co-authored-by: Marshall Bowers <elliott.codes@gmail.com> Co-authored-by: Max <max@zed.dev>
This commit is contained in:
parent
dfe1e43832
commit
01ad22683d
7 changed files with 83 additions and 29 deletions
|
@ -12,5 +12,6 @@ workspace = true
|
|||
path = "src/telemetry_events.rs"
|
||||
|
||||
[dependencies]
|
||||
language.workspace = true
|
||||
semantic_version.workspace = true
|
||||
serde.workspace = true
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
//! See [Telemetry in Zed](https://zed.dev/docs/telemetry) for additional information.
|
||||
|
||||
use language::LanguageName;
|
||||
use semantic_version::SemanticVersion;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::{fmt::Display, sync::Arc, time::Duration};
|
||||
|
@ -153,8 +154,10 @@ pub struct AssistantEvent {
|
|||
pub phase: AssistantPhase,
|
||||
/// Name of the AI model used (gpt-4o, claude-3-5-sonnet, etc)
|
||||
pub model: String,
|
||||
pub model_provider: String,
|
||||
pub response_latency: Option<Duration>,
|
||||
pub error_message: Option<String>,
|
||||
pub language_name: Option<LanguageName>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue