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
|
@ -1040,6 +1040,7 @@ impl Codegen {
|
|||
self.transaction = Some(TerminalTransaction::start(self.terminal.clone()));
|
||||
self.generation = cx.spawn(|this, mut cx| async move {
|
||||
let model_telemetry_id = model.telemetry_id();
|
||||
let model_provider_id = model.provider_id();
|
||||
let response = model.stream_completion_text(prompt, &cx).await;
|
||||
let generate = async {
|
||||
let (mut hunks_tx, mut hunks_rx) = mpsc::channel(1);
|
||||
|
@ -1069,8 +1070,10 @@ impl Codegen {
|
|||
kind: AssistantKind::Inline,
|
||||
phase: AssistantPhase::Response,
|
||||
model: model_telemetry_id,
|
||||
model_provider: model_provider_id.to_string(),
|
||||
response_latency,
|
||||
error_message,
|
||||
language_name: None,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue