mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 16:57:46 +00:00
Fix circular reference JSON serialization in telemetry logging (#4150)
This commit is contained in:
@@ -23,6 +23,7 @@ import {
|
||||
getCachedGoogleAccount,
|
||||
getLifetimeGoogleAccounts,
|
||||
} from '../../utils/user_account.js';
|
||||
import { safeJsonStringify } from '../../utils/safeJsonStringify.js';
|
||||
|
||||
const start_session_event_name = 'start_session';
|
||||
const new_prompt_event_name = 'new_prompt';
|
||||
@@ -65,7 +66,7 @@ export class ClearcutLogger {
|
||||
this.events.push([
|
||||
{
|
||||
event_time_ms: Date.now(),
|
||||
source_extension_json: JSON.stringify(event),
|
||||
source_extension_json: safeJsonStringify(event),
|
||||
},
|
||||
]);
|
||||
}
|
||||
@@ -121,7 +122,7 @@ export class ClearcutLogger {
|
||||
log_event: eventsToSend,
|
||||
},
|
||||
];
|
||||
const body = JSON.stringify(request);
|
||||
const body = safeJsonStringify(request);
|
||||
const options = {
|
||||
hostname: 'play.googleapis.com',
|
||||
path: '/log',
|
||||
|
||||
Reference in New Issue
Block a user