feat: debug log file for diagnostics (#1211)

Co-authored-by: Letta <noreply@letta.com>
This commit is contained in:
cthomas
2026-02-27 16:49:26 -08:00
committed by GitHub
parent 22c31b3d74
commit e0cea19c9f
3 changed files with 151 additions and 25 deletions

View File

@@ -1,5 +1,6 @@
import { getLettaCodeHeaders } from "../agent/http-headers";
import { settingsManager } from "../settings-manager";
import { debugLogFile } from "../utils/debug";
import { getVersion } from "../version";
export interface TelemetryEvent {
@@ -50,6 +51,7 @@ export interface ErrorData {
model_id?: string;
run_id?: string;
recent_chunks?: Record<string, unknown>[];
debug_log_tail?: string;
}
export interface UserInputData {
@@ -382,6 +384,7 @@ class TelemetryManager {
model_id: options?.modelId,
run_id: options?.runId,
recent_chunks: options?.recentChunks,
debug_log_tail: debugLogFile.getTail(),
};
this.track("error", data);
}