feat: include recent chunks in error telemetry (#1134)
This commit is contained in:
@@ -2910,6 +2910,7 @@ export default function App({
|
||||
if (!skipTelemetry) {
|
||||
telemetry.trackError("ui_error", text, "error_display", {
|
||||
modelId: currentModelId || undefined,
|
||||
recentChunks: chunkLog.getEntries(),
|
||||
});
|
||||
}
|
||||
},
|
||||
@@ -4764,6 +4765,7 @@ export default function App({
|
||||
{
|
||||
modelId: currentModelId || undefined,
|
||||
runId: lastRunId ?? undefined,
|
||||
recentChunks: chunkLog.getEntries(),
|
||||
},
|
||||
);
|
||||
|
||||
@@ -4934,6 +4936,7 @@ export default function App({
|
||||
httpStatus,
|
||||
modelId: currentModelId || undefined,
|
||||
runId: currentRunId,
|
||||
recentChunks: chunkLog.getEntries(),
|
||||
});
|
||||
|
||||
// Use comprehensive error formatting
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user