summaryrefslogtreecommitdiff
path: root/packages/core/src/telemetry
diff options
context:
space:
mode:
authorGaurav <[email protected]>2025-07-11 14:08:49 -0700
committerGitHub <[email protected]>2025-07-11 21:08:49 +0000
commit764809753ad85ecc209aa9b126efbb3390c03274 (patch)
tree09042251c458333eec911e0c54f8bcfd163eac95 /packages/core/src/telemetry
parenta071f604e3880d288304e338bebfa442d729f861 (diff)
fix: `TypeError: Cannot read properties of undefined (reading 'authType')` (#3914)
Diffstat (limited to 'packages/core/src/telemetry')
-rw-r--r--packages/core/src/telemetry/types.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/packages/core/src/telemetry/types.ts b/packages/core/src/telemetry/types.ts
index 9f6e1462..9ac12050 100644
--- a/packages/core/src/telemetry/types.ts
+++ b/packages/core/src/telemetry/types.ts
@@ -96,13 +96,13 @@ export class UserPromptEvent {
'event.timestamp': string; // ISO 8601
prompt_length: number;
prompt_id: string;
- auth_type: string;
+ auth_type?: string;
prompt?: string;
constructor(
prompt_length: number,
prompt_Id: string,
- auth_type: string,
+ auth_type?: string,
prompt?: string,
) {
this['event.name'] = 'user_prompt';
@@ -167,14 +167,14 @@ export class ApiErrorEvent {
status_code?: number | string;
duration_ms: number;
prompt_id: string;
- auth_type: string;
+ auth_type?: string;
constructor(
model: string,
error: string,
duration_ms: number,
prompt_id: string,
- auth_type: string,
+ auth_type?: string,
error_type?: string,
status_code?: number | string,
) {
@@ -205,13 +205,13 @@ export class ApiResponseEvent {
total_token_count: number;
response_text?: string;
prompt_id: string;
- auth_type: string;
+ auth_type?: string;
constructor(
model: string,
duration_ms: number,
prompt_id: string,
- auth_type: string,
+ auth_type?: string,
usage_data?: GenerateContentResponseUsageMetadata,
response_text?: string,
error?: string,