Fix for race condition in extension install / uninstall logging (#10856)

This commit is contained in:
owenofbrien
2025-10-09 17:40:27 -05:00
committed by GitHub
parent fda3b54357
commit cce245738e

View File

@@ -904,7 +904,9 @@ export class ClearcutLogger {
this.enqueueLogEvent(
this.createLogEvent(EventNames.EXTENSION_INSTALL, data),
);
this.flushIfNeeded();
this.flushToClearcut().catch((error) => {
console.debug('Error flushing to Clearcut:', error);
});
}
logExtensionUninstallEvent(event: ExtensionUninstallEvent): void {
@@ -922,7 +924,9 @@ export class ClearcutLogger {
this.enqueueLogEvent(
this.createLogEvent(EventNames.EXTENSION_UNINSTALL, data),
);
this.flushIfNeeded();
this.flushToClearcut().catch((error) => {
console.debug('Error flushing to Clearcut:', error);
});
}
logToolOutputTruncatedEvent(event: ToolOutputTruncatedEvent): void {
@@ -1005,7 +1009,9 @@ export class ClearcutLogger {
this.enqueueLogEvent(
this.createLogEvent(EventNames.EXTENSION_ENABLE, data),
);
this.flushIfNeeded();
this.flushToClearcut().catch((error) => {
console.debug('Error flushing to Clearcut:', error);
});
}
logModelSlashCommandEvent(event: ModelSlashCommandEvent): void {
@@ -1038,7 +1044,9 @@ export class ClearcutLogger {
this.enqueueLogEvent(
this.createLogEvent(EventNames.EXTENSION_DISABLE, data),
);
this.flushIfNeeded();
this.flushToClearcut().catch((error) => {
console.debug('Error flushing to Clearcut:', error);
});
}
logSmartEditStrategyEvent(event: SmartEditStrategyEvent): void {