add(telemetry): Add missing telemetry for UserPromptEvent (#6885)

Co-authored-by: Shnatu <snatu@google.com>
Co-authored-by: Arya Gummadi <aryagummadi@google.com>
This commit is contained in:
Shardul Natu
2025-08-27 19:17:32 -07:00
committed by GitHub
parent f22263c9e8
commit 539a49bd24
3 changed files with 15 additions and 4 deletions

View File

@@ -122,8 +122,13 @@ export function logUserPrompt(config: Config, event: UserPromptEvent): void {
'event.name': EVENT_USER_PROMPT,
'event.timestamp': new Date().toISOString(),
prompt_length: event.prompt_length,
prompt_id: event.prompt_id,
};
if (event.auth_type) {
attributes['auth_type'] = event.auth_type;
}
if (shouldLogUserPrompts(config)) {
attributes['prompt'] = event.prompt;
}