openclaw - ✅(Solved) Fix [Bug] diagnostics-otel: "internal diagnostics capability unavailable" after upgrade to 2026.5.2 — origin gate regression [1 pull requests, 1 comments, 2 participants]

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…
GitHub stats
openclaw/openclaw#77206Fetched 2026-05-05 05:51:08
View on GitHub
Comments
1
Participants
2
Timeline
3
Reactions
3
Author
Timeline (top)
closed ×1commented ×1cross-referenced ×1

After upgrading to OpenClaw 2026.5.2, the diagnostics-otel plugin fails at startup with internal diagnostics capability unavailable. All OpenTelemetry export (traces, metrics, logs) stops working — no data reaches the collector (e.g. SigNoz).

Error Message

ctx.logger.error("diagnostics-otel: internal diagnostics capability unavailable"); error plugins diagnostics-otel: internal diagnostics capability unavailable

Root Cause

The bug is in the plugin service context factory (dist/services-CTQW_M_S.js):

const grantsInternalDiagnostics =
  params.service?.origin === "bundled" &&
  params.service.pluginId === params.service.service.id &&
  (params.service.service.id === "diagnostics-otel" ||
   params.service.service.id === "diagnostics-prometheus");

Only plugins with origin === "bundled" (i.e. loaded from dist/extensions/) can receive the internalDiagnostics capability (emit + onEvent).

However, in 2026.5.2, diagnostics-otel is no longer a bundled extension — it does not exist in dist/extensions/. It must be installed externally via openclaw plugins install @openclaw/diagnostics-otel, which registers it with origin: "global".

Plugin metadata confirms this:

PluginOriginStatusSource
memory-corebundledloadeddist/extensions/memory-core/index.js
memory-wikibundledloadeddist/extensions/memory-wiki/index.js
diagnostics-otelgloballoaded~/.openclaw/npm/node_modules/@openclaw/diagnostics-otel/index.ts

Since origin is "global" (not "bundled"), grantsInternalDiagnostics evaluates to false, the internalDiagnostics object is never injected into the plugin's context, and the plugin's service initialization fails:

// @openclaw/diagnostics-otel/src/service.ts:2173
const subscribe = ctx.internalDiagnostics?.onEvent;
if (!subscribe) {
  ctx.logger.error("diagnostics-otel: internal diagnostics capability unavailable");
  return;  // <-- plugin exits here, no telemetry is ever exported
}

Fix Action

Fix / Workaround

Complete loss of OpenTelemetry observability for users upgrading to 2026.5.2. No workaround available without patching the source.

PR fix notes

PR #77210: fix(plugins): grant internalDiagnostics to global-origin official diagnostics plugins

Description (problem / solution / changelog)

Summary

Fixes #77206 — diagnostics-otel and diagnostics-prometheus fail with "internal diagnostics capability unavailable" after upgrading to 2026.5.2 because they were externalized from the bundled extensions directory.

Root Cause

createServiceContext in src/plugins/services.ts gates internalDiagnostics on origin === "bundled". After externalization, these plugins are installed via openclaw plugins install @openclaw/diagnostics-otel, which registers them with origin: "global". The gate fails and the capability is never injected.

Fix

Widen the origin check to accept both "bundled" and "global" origins for the two known diagnostics plugin IDs. The existing guards remain intact:

  • pluginId === service.id — prevents capability leak across plugin boundaries
  • Explicit service ID allowlist — only diagnostics-otel and diagnostics-prometheus
  • "workspace" and "config" origins remain denied (untrusted)

Changes

  • src/plugins/services.ts — 1-line origin gate change
  • src/plugins/services.test.ts — add test coverage for global origin grant and config origin denial
  • CHANGELOG.md — add fix entry

Security

The internalDiagnostics capability is only granted to plugins that match ALL of:

  1. Origin is "bundled" or "global" (installed via npm, not workspace-local)
  2. pluginId === service.id (service registered by its own plugin)
  3. Service ID is exactly "diagnostics-otel" or "diagnostics-prometheus"

This means an attacker would need to publish to the @openclaw npm scope AND match the exact plugin/service IDs, which is controlled by the OpenClaw team.

Changed files

  • CHANGELOG.md (modified, +1/-0)
  • src/plugins/services.test.ts (modified, +37/-0)
  • src/plugins/services.ts (modified, +1/-1)

Code Example

const grantsInternalDiagnostics =
  params.service?.origin === "bundled" &&
  params.service.pluginId === params.service.service.id &&
  (params.service.service.id === "diagnostics-otel" ||
   params.service.service.id === "diagnostics-prometheus");

---

// @openclaw/diagnostics-otel/src/service.ts:2173
const subscribe = ctx.internalDiagnostics?.onEvent;
if (!subscribe) {
  ctx.logger.error("diagnostics-otel: internal diagnostics capability unavailable");
  return;  // <-- plugin exits here, no telemetry is ever exported
}

---

error plugins diagnostics-otel: internal diagnostics capability unavailable
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug — plugin capability regression in 2026.5.2

Summary

After upgrading to OpenClaw 2026.5.2, the diagnostics-otel plugin fails at startup with internal diagnostics capability unavailable. All OpenTelemetry export (traces, metrics, logs) stops working — no data reaches the collector (e.g. SigNoz).

Root cause analysis

The bug is in the plugin service context factory (dist/services-CTQW_M_S.js):

const grantsInternalDiagnostics =
  params.service?.origin === "bundled" &&
  params.service.pluginId === params.service.service.id &&
  (params.service.service.id === "diagnostics-otel" ||
   params.service.service.id === "diagnostics-prometheus");

Only plugins with origin === "bundled" (i.e. loaded from dist/extensions/) can receive the internalDiagnostics capability (emit + onEvent).

However, in 2026.5.2, diagnostics-otel is no longer a bundled extension — it does not exist in dist/extensions/. It must be installed externally via openclaw plugins install @openclaw/diagnostics-otel, which registers it with origin: "global".

Plugin metadata confirms this:

PluginOriginStatusSource
memory-corebundledloadeddist/extensions/memory-core/index.js
memory-wikibundledloadeddist/extensions/memory-wiki/index.js
diagnostics-otelgloballoaded~/.openclaw/npm/node_modules/@openclaw/diagnostics-otel/index.ts

Since origin is "global" (not "bundled"), grantsInternalDiagnostics evaluates to false, the internalDiagnostics object is never injected into the plugin's context, and the plugin's service initialization fails:

// @openclaw/diagnostics-otel/src/service.ts:2173
const subscribe = ctx.internalDiagnostics?.onEvent;
if (!subscribe) {
  ctx.logger.error("diagnostics-otel: internal diagnostics capability unavailable");
  return;  // <-- plugin exits here, no telemetry is ever exported
}

Steps to reproduce

  1. Install OpenClaw 2026.5.2 (stable channel)
  2. openclaw plugins install @openclaw/diagnostics-otel
  3. Enable the plugin: openclaw plugins enable diagnostics-otel
  4. Configure diagnostics.otel with a valid collector endpoint
  5. openclaw gateway restart
  6. Check logs: openclaw logs | grep diagnostics-otel

Expected behavior

diagnostics-otel should receive the internalDiagnostics capability regardless of origin, since it is an officially published @openclaw plugin. The capability gate should match on plugin ID, not on load origin.

Actual behavior

error plugins diagnostics-otel: internal diagnostics capability unavailable

No traces, metrics, or logs are exported to the configured OTLP collector.

Environment

FieldValue
OpenClaw version2026.5.2 (stable)
OSLinux 6.12.63+deb13-amd64 (x64)
Install methodnpm global
diagnostics-otel version2026.5.2
diagnostics-otel originglobal (~/.openclaw/npm/node_modules/@openclaw/diagnostics-otel)
CollectorSigNoz (OTLP/HTTP on port 4318, verified reachable)

Suggested fix

The grantsInternalDiagnostics gate should also accept origin === "global" (or any origin) for plugin IDs "diagnostics-otel" and "diagnostics-prometheus", since these are trusted @openclaw packages that are no longer bundled in dist/extensions/.

Alternatively, re-bundle diagnostics-otel back into dist/extensions/ so it loads with origin === "bundled".

Impact

Complete loss of OpenTelemetry observability for users upgrading to 2026.5.2. No workaround available without patching the source.

extent analysis

TL;DR

The diagnostics-otel plugin fails to start due to missing internalDiagnostics capability, likely caused by the plugin's origin being "global" instead of "bundled", and can be fixed by updating the grantsInternalDiagnostics gate to accept "global" origin for trusted plugins.

Guidance

  • Update the grantsInternalDiagnostics function to accept "global" origin for plugin IDs "diagnostics-otel" and "diagnostics-prometheus".
  • Alternatively, consider re-bundling diagnostics-otel into dist/extensions/ to load it with "bundled" origin.
  • Verify the fix by checking the plugin's logs for successful initialization and telemetry export to the configured collector.
  • Test the updated grantsInternalDiagnostics gate with different plugin origins and IDs to ensure correct behavior.

Example

const grantsInternalDiagnostics =
  (params.service?.origin === "bundled" || params.service?.origin === "global") &&
  params.service.pluginId === params.service.service.id &&
  (params.service.service.id === "diagnostics-otel" ||
   params.service.service.id === "diagnostics-prometheus");

Notes

The suggested fix assumes that the diagnostics-otel plugin is a trusted package and should receive the internalDiagnostics capability regardless of its origin. Additional testing and verification may be necessary to ensure the fix does not introduce security vulnerabilities or other issues.

Recommendation

Apply the workaround by updating the grantsInternalDiagnostics gate to accept "global" origin for trusted plugins, as this is a more straightforward and less invasive fix compared to re-bundling the plugin.

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…

FAQ

Expected behavior

diagnostics-otel should receive the internalDiagnostics capability regardless of origin, since it is an officially published @openclaw plugin. The capability gate should match on plugin ID, not on load origin.

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 - ✅(Solved) Fix [Bug] diagnostics-otel: "internal diagnostics capability unavailable" after upgrade to 2026.5.2 — origin gate regression [1 pull requests, 1 comments, 2 participants]