feat: include recent chunks in error telemetry (#1134)

This commit is contained in:
jnjpng
2026-02-25 10:56:24 -08:00
committed by GitHub
parent 423215fd56
commit 9f91b1ab28
2 changed files with 6 additions and 0 deletions

View File

@@ -49,6 +49,7 @@ export interface ErrorData {
http_status?: number;
model_id?: string;
run_id?: string;
recent_chunks?: Record<string, unknown>[];
}
export interface UserInputData {
@@ -356,6 +357,7 @@ class TelemetryManager {
httpStatus?: number;
modelId?: string;
runId?: string;
recentChunks?: Record<string, unknown>[];
},
) {
const data: ErrorData = {
@@ -365,6 +367,7 @@ class TelemetryManager {
http_status: options?.httpStatus,
model_id: options?.modelId,
run_id: options?.runId,
recent_chunks: options?.recentChunks,
};
this.track("error", data);
}