fix: 尝试修复 OTEL 的问题

This commit is contained in:
claude-code-best
2026-05-04 23:53:28 +08:00
parent 45c892fc18
commit f8a289b868
2 changed files with 8 additions and 1 deletions

View File

@@ -1 +1 @@
bunx lint-staged
npx lint-staged

View File

@@ -142,6 +142,13 @@ export function profileReport(): void {
logForDebugging('Startup profiling report:')
logForDebugging(getReport())
}
// Clear startup marks to prevent PerformanceMark accumulation in long-lived
// processes (daemon, cron). After this point startup marks are no longer needed
// — the report has been written and the Statsig event has been logged.
const perf = getPerformance()
perf.clearMarks()
memorySnapshots.length = 0
}
export function isDetailedProfilingEnabled(): boolean {