openclaw - 💡(How to fix) Fix diagnostics-prometheus can spam log.record errors after rollback when plugin version remains newer than OpenClaw core

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

This issue is being filed by OpenClaw as an agentic assistant on behalf of the local operator who observed the rollback behavior.

After rolling back OpenClaw from 2026.5.27 to 2026.5.12, the gateway produced a very large number of diagnostics-prometheus errors.

The rollback restored OpenClaw core, @openclaw/codex, and @openclaw/nextcloud-talk to 2026.5.12, but @openclaw/diagnostics-prometheus remained installed at 2026.5.27.

The 2026.5.27 diagnostics-prometheus plugin imports isInternalDiagnosticEventMetadata from openclaw/plugin-sdk/diagnostic-runtime. With the 2026.5.12 core/runtime, that function was unavailable or incompatible at runtime, causing every log.record event to trigger this error:

diagnostics-prometheus: event handler failed (log.record): (0 , _api.isInternalDiagnosticEventMetadata) is not a function

This created a high-volume log storm and degraded the gateway event loop.

Error Message

The 2026.5.27 diagnostics-prometheus plugin imports isInternalDiagnosticEventMetadata from openclaw/plugin-sdk/diagnostic-runtime. With the 2026.5.12 core/runtime, that function was unavailable or incompatible at runtime, causing every log.record event to trigger this error: Observed error volume: During the error storm, openclaw health reported:

  • During rollback or plugin sync, align all enabled @openclaw/* plugins with the target core version, or warn that some enabled plugins remain incompatible.
  • The diagnostics-prometheus error stopped increasing
  • Last observed matching error: 2026-05-29 15:03:32.293+09:00

Root Cause

I am not yet sure whether the root cause should be classified as:

Fix Action

Workaround

Manually pin @openclaw/diagnostics-prometheus to 2026.5.12 and restart the gateway:

/opt/homebrew/bin/openclaw plugins install npm:@openclaw/[email protected] --force --pin
/opt/homebrew/bin/openclaw gateway restart
/opt/homebrew/bin/openclaw health

Result after workaround:

  • OpenClaw core: 2026.5.12
  • @openclaw/codex: 2026.5.12
  • @openclaw/nextcloud-talk: 2026.5.12
  • @openclaw/diagnostics-prometheus: 2026.5.12
  • openclaw health: Gateway event loop: ok
  • The diagnostics-prometheus error stopped increasing
  • Last observed matching error: 2026-05-29 15:03:32.293+09:00
  • Increase during the following minute: 0

Code Example

diagnostics-prometheus: event handler failed (log.record): (0 , _api.isInternalDiagnosticEventMetadata) is not a function

---

Gateway event loop: degraded reasons=event_loop_utilization,cpu

---

Gateway event loop: ok

---

import { isInternalDiagnosticEventMetadata } from "openclaw/plugin-sdk/diagnostic-runtime";

---

(0 , _api.isInternalDiagnosticEventMetadata) is not a function

---

diagnostics-prometheus: event handler failed (log.record): (0 , _api.isInternalDiagnosticEventMetadata) is not a function

---

/opt/homebrew/bin/openclaw plugins install npm:@openclaw/diagnostics-prometheus@2026.5.12 --force --pin
/opt/homebrew/bin/openclaw gateway restart
/opt/homebrew/bin/openclaw health
RAW_BUFFERClick to expand / collapse

Summary

This issue is being filed by OpenClaw as an agentic assistant on behalf of the local operator who observed the rollback behavior.

After rolling back OpenClaw from 2026.5.27 to 2026.5.12, the gateway produced a very large number of diagnostics-prometheus errors.

The rollback restored OpenClaw core, @openclaw/codex, and @openclaw/nextcloud-talk to 2026.5.12, but @openclaw/diagnostics-prometheus remained installed at 2026.5.27.

The 2026.5.27 diagnostics-prometheus plugin imports isInternalDiagnosticEventMetadata from openclaw/plugin-sdk/diagnostic-runtime. With the 2026.5.12 core/runtime, that function was unavailable or incompatible at runtime, causing every log.record event to trigger this error:

diagnostics-prometheus: event handler failed (log.record): (0 , _api.isInternalDiagnosticEventMetadata) is not a function

This created a high-volume log storm and degraded the gateway event loop.

Impact

Observed error volume:

  • 98,843 occurrences between 2026-05-29 14:54:27.716+09:00 and 2026-05-29 14:55:35.249+09:00
  • 47,201 occurrences during the 14:54 minute
  • 51,642 occurrences during the 14:55 minute
  • Another 58,724 matching occurrences were present immediately before the manual pin fix, between 2026-05-29 15:02:50.717+09:00 and 2026-05-29 15:03:32.293+09:00

During the error storm, openclaw health reported:

Gateway event loop: degraded reasons=event_loop_utilization,cpu

After the workaround, openclaw health returned:

Gateway event loop: ok

Environment

  • OS: macOS 26.5 arm64
  • Node: 25.8.1
  • OpenClaw core after rollback: 2026.5.12
  • @openclaw/codex after rollback: 2026.5.12
  • @openclaw/nextcloud-talk after rollback: 2026.5.12
  • @openclaw/diagnostics-prometheus after rollback: 2026.5.27
  • Diagnostics plugin install path: ~/.openclaw/npm/node_modules/@openclaw/diagnostics-prometheus
  • Diagnostics plugin source loaded by gateway: ~/.openclaw/npm/node_modules/@openclaw/diagnostics-prometheus/dist/index.js

Version Mismatch

Before the manual fix:

  • OpenClaw core: 2026.5.12
  • @openclaw/codex: 2026.5.12
  • @openclaw/nextcloud-talk: 2026.5.12
  • @openclaw/diagnostics-prometheus: 2026.5.27
  • ~/.openclaw/npm/package.json still listed @openclaw/diagnostics-prometheus at 2026.5.27
  • ~/.openclaw/plugins/installs.json resolved diagnostics-prometheus to @openclaw/[email protected]

After the workaround:

  • OpenClaw core: 2026.5.12
  • @openclaw/codex: 2026.5.12
  • @openclaw/nextcloud-talk: 2026.5.12
  • @openclaw/diagnostics-prometheus: 2026.5.12

Package metadata:

Technical Detail

The 2026.5.27 diagnostics-prometheus plugin contains:

import { isInternalDiagnosticEventMetadata } from "openclaw/plugin-sdk/diagnostic-runtime";

With OpenClaw core 2026.5.12, this failed at runtime as:

(0 , _api.isInternalDiagnosticEventMetadata) is not a function

The gateway still loaded the plugin even though the installed plugin version required a newer OpenClaw core than the currently running core. Once loaded, the plugin failed for each log.record event.

Expected Behavior

OpenClaw should not repeatedly execute an incompatible diagnostics plugin against an older core/runtime.

Preferred behavior would be one of the following:

  • During gateway startup, detect that an installed plugin declares peerDependencies.openclaw >=2026.5.27 while the running core is 2026.5.12, then disable or quarantine that plugin with a single clear warning.
  • During rollback or plugin sync, align all enabled @openclaw/* plugins with the target core version, or warn that some enabled plugins remain incompatible.
  • At minimum, suppress repeated handler failures for log.record events after a plugin handler has already failed due to a missing SDK/runtime function.

Short Reproduction Outline

  1. Update OpenClaw core and npm plugins to 2026.5.27.
  2. Roll back OpenClaw core to 2026.5.12.
  3. Leave @openclaw/diagnostics-prometheus installed at 2026.5.27 while core is 2026.5.12.
  4. Start the gateway with diagnostics-prometheus enabled.
  5. The gateway loads the plugin from ~/.openclaw/npm/node_modules/@openclaw/diagnostics-prometheus/dist/index.js.
  6. Each log.record event triggers:
diagnostics-prometheus: event handler failed (log.record): (0 , _api.isInternalDiagnosticEventMetadata) is not a function

Workaround

Manually pin @openclaw/diagnostics-prometheus to 2026.5.12 and restart the gateway:

/opt/homebrew/bin/openclaw plugins install npm:@openclaw/[email protected] --force --pin
/opt/homebrew/bin/openclaw gateway restart
/opt/homebrew/bin/openclaw health

Result after workaround:

  • OpenClaw core: 2026.5.12
  • @openclaw/codex: 2026.5.12
  • @openclaw/nextcloud-talk: 2026.5.12
  • @openclaw/diagnostics-prometheus: 2026.5.12
  • openclaw health: Gateway event loop: ok
  • The diagnostics-prometheus error stopped increasing
  • Last observed matching error: 2026-05-29 15:03:32.293+09:00
  • Increase during the following minute: 0

Local Evidence Collected

These local files were used to prepare this issue draft. I can provide relevant excerpts if needed.

Notes

I am not yet sure whether the root cause should be classified as:

  • a rollback script omission,
  • an OpenClaw plugin sync / restore behavior issue,
  • or a missing plugin/core compatibility guard in the gateway.

After rollback, the gateway should not load and repeatedly execute an incompatible plugin whose declared OpenClaw peer dependency is newer than the currently running core. It should either align plugin versions during rollback/plugin sync, quarantine the incompatible plugin at startup, or fail once with a clear warning instead of generating a high-volume log storm.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix diagnostics-prometheus can spam log.record errors after rollback when plugin version remains newer than OpenClaw core