(entry: Omit<TraceEntry, 'id' | 'ts'>)
| 101 | } |
| 102 | |
| 103 | function push(entry: Omit<TraceEntry, 'id' | 'ts'>): void { |
| 104 | if (tracePaused.value) return; |
| 105 | entries.push({ id: nextId++, ts: Date.now(), ...entry }); |
| 106 | if (entries.length > MAX_ENTRIES) entries.splice(0, entries.length - MAX_ENTRIES); |
| 107 | traceVersion.value++; |
| 108 | } |
| 109 | |
| 110 | // --------------------------------------------------------------------------- |
| 111 | // Sanitization — redact sensitive keys, truncate long strings/arrays/depth. |
no test coverage detected