-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
diagnostics.otel log export sets every LogRecord body to the literal "log" and omits trace_id/span_id — OTLP logs are content-free and uncorrelatable #91865
Copy link
Copy link
Closed
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper 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 does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper 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 does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Priority
None yet
Summary
With
diagnostics.otel.logs: true, OpenClaw exports log records over OTLP, but everyLogRecord.bodyis the literal string"log"instead of the formatted message, andtrace_id/span_idare empty on every record. The actual message is written to stdout/logToFilebut never reaches the OTLP body — only metadata attributes (openclaw.subsystem,openclaw.log.level,code.function,code.lineno) survive.Net effect: logs in any OTLP backend are both content-free (you can't read or search what happened) and uncorrelatable (no
trace_idto join them to the trace/turn). This is distinct from #77391 (that's span attribute content /captureContent); this is about the OTLP logs signal.Version note
Confirmed present through stable
2026.6.5and pre-release2026.6.10-alpha.1— no merged PR appears to address it. (#70961"attach trace context to otel logs" is already in-tree but doesn't populatetrace_idhere, because these logs are emitted outside an active span context — see #50291.#91256addresses span content capture, not log-record bodies.)Environment
2026.5.28(Docker); behavior reconfirmed against2026.6.5/2026.6.10-alpha.1http/protobuf→ an OpenTelemetry Collector (otlpreceiver,batchprocessor only, notransform/attributesprocessor) → an OTLP-compatible logs backend. The collector applies no log transformation, so the placeholder originates in OpenClaw.Reproduction
Then query the OTLP logs backend (or inspect the collector's raw log capture).
Observed
A representative exported
LogRecord(an ERROR-severity diagnostic log):{ "body": "log", "severityText": "ERROR", "traceId": "", "spanId": "", "attributes": { "openclaw.subsystem": "diagnostic", "openclaw.log.level": "ERROR", "openclaw.logger.parents": "openclaw", "code.function": "logToFile", "code.lineno": 179 } }The corresponding stdout line carries the full, actionable content that is missing from the OTLP body — e.g. a diagnostic line of the form:
A backend query of
body CONTAINS "<any word from the real message>"returns 0 rows — confirming the message text never reaches the OTLP record. Thecode.function: "logToFile"attribute suggests the OTLP log bridge captures the call site but emits a static"log"body rather than the rendered message.Expected
LogRecord.bodyshould be the rendered log message (size-capped, optionally redacted) — the same content that goes to stdout/logToFile.trace_id/span_idshould be populated so logs correlate to their trace/turn.Impact
trace_id, logs can't be joined to traces or to a turn, so observability tooling can't attach log context to a finding.parentSpanId), a consumer reading only the telemetry backend cannot reconstruct what an agent did or why it failed — even though the detail exists locally.Related
captureContent.*non-functional (span attribute content)parentSpanId/runId)