Skip to content

diagnostics.otel.captureContent.* is non-functional — runtime broadcast emits sanitized paramsSummary only #77391

@mjunaidca

Description

@mjunaidca

Summary

diagnostics.otel.captureContent.{inputMessages,outputMessages,toolInputs,toolOutputs} is documented but does nothing. The runtime emits only sanitized paramsSummary on the broadcast stream that bundled diagnostics-otel consumes — raw inputMessages, toolInput, and toolResult content never appear in OTel span attributes. Confirmed empirically against pre-bug traces from 2026-05-03 through 2026-05-04 with captureContent: {enabled: true, inputMessages: true, outputMessages: true, toolInputs: true, toolOutputs: true}: zero openclaw.content.* attributes on any span.

Environment

  • OpenClaw 2026.5.3-1 (also confirmed on 2026.5.3 and earlier 5.2 releases)

Reproduction

openclaw config set diagnostics.otel.enabled true
openclaw config set diagnostics.otel.captureContent.enabled true
openclaw config set diagnostics.otel.captureContent.inputMessages true
openclaw config set diagnostics.otel.captureContent.outputMessages true
openclaw config set diagnostics.otel.captureContent.toolInputs true
openclaw config set diagnostics.otel.captureContent.toolOutputs true
openclaw gateway restart --wait 30s

openclaw agent --message 'hello' --agent main --to '+15555550100' --json

Observed

Spans reach the OTLP endpoint with openclaw.run, model_call, tool.execution names, but no openclaw.content.*, openclaw.input.*, or openclaw.output.* attributes are populated. Tool spans carry only paramsSummary (a hash + length, no actual values).

Expected

Per docs (/gateway/opentelemetry), captureContent: true should populate raw input/output content as span attributes (size-capped, optionally redacted).

Working approach (for reference)

We bypassed this by writing a separate plugin that subscribes to public hooks (api.on("before_tool_call", ...), api.on("llm_input", ...), etc.) — the hook arguments contain full unsanitized content because the runtime calls hook handlers with the real data, not the sanitized broadcast. Code: https://github.com/mjunaidca/tutorclaw/tree/main/plugins/tutorclaw-tracing

This works, but it means every operator who wants content visibility has to ship their own plugin. The bundled diagnostics-otel's configuration knob is the natural seam — it just doesn't work today.

Suggested fix

Either:

  • (a) Wire captureContent.* flags through to actual content-emission paths so the documented config does what it claims; OR
  • (b) Document captureContent as deprecated/no-op and point operators at the public-hook plugin pattern as the recommended approach.

Related

Related to #77390 (bundled-only origin gate) — even if captureContent worked, externally-installed diagnostics-otel couldn't receive the events to attach attributes to.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions