Skip to content

Commit fd60384

Browse files
fangxiu-wfclaude
andcommitted
fix(openclaw): log stale-sweeper flush failures in debug mode
Previously the sweeper's forceFlush error was silently swallowed, hiding export-pipeline faults. Log it at warn level when debug is enabled. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 59d8996 commit fd60384

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

  • opentelemetry-instrumentation-openclaw/src

opentelemetry-instrumentation-openclaw/src/index.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,13 @@ const armsTracePlugin: OpenClawPlugin = {
594594
}
595595
}
596596
if (closedAny) {
597-
void exporter.flush().catch(() => {});
597+
void exporter.flush().catch((err) => {
598+
if (config.debug) {
599+
api.logger.warn(
600+
`[ArmsTrace] Stale-sweeper flush failed: ${String(err)}`,
601+
);
602+
}
603+
});
598604
}
599605
};
600606
const contextSweepTimer = setInterval(sweepStaleContexts, CONTEXT_SWEEP_INTERVAL_MS);

0 commit comments

Comments
 (0)