Fix batch flush to Clearcut (#1337)

Co-authored-by: Scott Densmore <scottdensmore@mac.com>
This commit is contained in:
Jerop Kipruto
2025-06-23 17:12:58 -04:00
committed by GitHub
parent d2ae7af487
commit 4d88054d35

View File

@@ -79,7 +79,6 @@ export class ClearcutLogger {
}
this.flushToClearcut();
this.last_flush_time = Date.now();
}
flushToClearcut(): Promise<LogResponse> {
@@ -121,6 +120,7 @@ export class ClearcutLogger {
}).then((buf: Buffer) => {
try {
this.events.length = 0;
this.last_flush_time = Date.now();
return this.decodeLogResponse(buf) || {};
} catch (error: unknown) {
console.error('Error flushing log events:', error);