Repository navigation
fix(diagnostics): honor signal-specific OTLP protocols - #119708
Conversation
322fbae to
a46e02c
Compare
|
@clawsweeper re-review Please review exact head The branch is rebased onto merged lifecycle PR #119705. Focused tests pass 232/232, live local OTLP smoke passes with all three signal requests and stdout preserved, formatting/docs guards pass, and fresh exact-head P0-P2 autoreview is clean. |
|
🦞👀 Command router queued. I will update this comment with the next step. |
|
@clawsweeper re-review Please review exact head The previous command collided with an older apply lease, which expired at The branch is rebased onto merged lifecycle PR #119705. Focused tests pass 232/232, live local OTLP smoke passes with all three signal requests and stdout preserved, formatting/docs guards pass, and fresh exact-head P0-P2 autoreview is clean. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed August 5, 2026, 5:31 PM ET / 21:31 UTC. ClawSweeper reviewWhat this changesThe PR resolves OTLP protocol settings independently for trace, metric, and log exporters, and forwards the three signal-specific variables through Docker setup. Merge readinessNo blocking patch defect was found. This member-authored, maintainer-labeled PR should remain open for normal exact-head CI completion and maintainer handling; current main still has the reported global protocol gate. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw’s diagnostics plugin turns internal diagnostic events into OTLP traces, metrics, and logs. Operator environment settings pass through Docker setup into the plugin, which decides which plugin-owned exporters can start. flowchart LR
A[Operator OTLP settings] --> B[Docker setup and Compose]
B --> C[Diagnostics plugin]
C --> D[Per-signal protocol decision]
D --> E[Trace and metric exporters]
D --> F[Log and stdout exporters]
E --> G[OTLP collector]
F --> G
Before merge
Agent review detailsSecurityNone. PR surfaceSource +49, Tests +296, Docs +5, Other +9. Total +359 across 10 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Merge the plugin-owned per-signal resolver after the remaining exact-head checks complete, retaining the documented precedence and isolated exporter rejection. Do we have a high-confidence way to reproduce the issue? Yes. Current main’s shared global gate is directly visible in source, and the PR’s focused tests provide a deterministic mixed-protocol setup covering the failure. Is this the best way to solve the issue? Yes. Resolving at the diagnostics plugin’s exporter-owner boundary preserves preloaded SDK ownership and stdout logging; retaining a global preflight would keep those sibling paths coupled. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 7b8bba26c953. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
@clawsweeper re-review Please review exact head The prior exact review run The branch is rebased onto merged lifecycle PR #119705. Focused tests pass 232/232, live local OTLP smoke passes with all three signal requests and stdout preserved, formatting/docs guards pass, and fresh exact-head P0-P2 autoreview is clean. |
4ac6441 to
84138dd
Compare
84138dd to
5b8822f
Compare
|
Maintainer decision: ACCEPT the documented compatibility change. Exact head Existing signal-specific OTLP protocol variables should become effective under the OpenTelemetry precedence contract. Unsupported values remain isolated to only their own plugin-owned exporter. |
|
Merged via squash.
|
…cope * origin/main: perf(agents): isolate concurrency benchmark workers (openclaw#119749) fix(diagnostics): preserve OTEL startup failure (openclaw#119747) fix(agents): seed fresh session identity before transcript append (openclaw#119473) fix: steering reaches active runs across agent harnesses (openclaw#119594) fix(cli): report accurate filtered node totals (openclaw#119744) fix(skills): keep installed verdicts scoped to publisher (openclaw#119672) fix(diagnostics): honor signal-specific OTLP protocols (openclaw#119708)
* fix(diagnostics): honor signal-specific OTLP protocols * fix(docker): forward signal-specific OTLP protocols
Closes #119703
What Problem This Solves
Operators using standard signal-specific OTLP protocol environment variables
could lose otherwise supported traces, metrics, or logs because the diagnostics
OpenTelemetry plugin applied only the shared protocol value and aborted every
signal together.
The same global gate could reject traces and metrics owned by a preloaded
OpenTelemetry SDK, and
logsExporter: "both"lost stdout output when only theOTLP log protocol was unsupported.
Why This Change Was Made
The plugin now resolves protocol independently for each plugin-owned signal:
explicit OpenClaw config, then the nonblank signal-specific environment value,
then the nonblank shared environment value, then
http/protobuf.Unsupported protocols disable only that plugin-owned OTLP exporter. Supported
siblings continue, preloaded trace and metric SDKs retain transport ownership,
and the stdout branch of combined log export stays active. Startup and failure
events describe the exporters that actually started.
Docker Compose and
scripts/docker/setup.shnow forward and persist all threesignal-specific protocol variables, so the documented deployment path reaches
the plugin behavior.
This does not add gRPC or HTTP/JSON transport support. The bundled exporters
remain explicit OTLP/HTTP protobuf exporters.
User Impact
Operators can use
OTEL_EXPORTER_OTLP_TRACES_PROTOCOL,OTEL_EXPORTER_OTLP_METRICS_PROTOCOL, andOTEL_EXPORTER_OTLP_LOGS_PROTOCOLwith the precedence defined by the stableOTLP exporter specification. One unsupported signal no longer suppresses
supported siblings or stdout diagnostics, including in Docker deployments.
Evidence
5b8822f2a7263d06a0f44b0896c63c31e22d147d, based onorigin/main7b8bba26c9539eb631a56ea65c2ff22771b2d0db.git range-diff e9e6ef3edbf22274eb79d41a1e092e5ce8f59e9f..84138dd35cc96865061b245be56032d8f90fed83 origin/main..HEAD: both commits remain patch-identical after the unrelated QA cleanup landed onmain.3aa0cc6d4f0be61795b3241d580b816af272d6fbac1b92600074629135d40432. The focused tests, live smoke, and autoreview below therefore cover the same patch bytes; exact-head static and hosted proof were rerun.TMPDIR=/tmp node scripts/run-vitest.mjs src/docker-setup.e2e.test.ts extensions/diagnostics-otel/src/service.test.ts extensions/diagnostics-otel/src/service.otlp-export.test.ts: Docker setup 41/41 passed; diagnostics protocol/service 232/232 passed.node --import tsx test/e2e/qa-lab/runtime/qa-otel-smoke-runtime.ts --collector local --logs-exporter both: live loopback smoke passed with 5 spans, 6 metrics, one OTLP log, one stdout log, and one request for each OTLP signal.{ "OTEL_EXPORTER_OTLP_TRACES_PROTOCOL": "http/protobuf", "OTEL_EXPORTER_OTLP_METRICS_PROTOCOL": "http/protobuf", "OTEL_EXPORTER_OTLP_LOGS_PROTOCOL": "http/protobuf" }bash -n scripts/docker/setup.sh,git diff --check origin/main...HEAD, and targetedoxfmt --checkpassed.@opentelemetry/sdk-node0.221.0 resolves each signal protocol variable beforeOTEL_EXPORTER_OTLP_PROTOCOL; the fixed*-otlp-protoexporters expose no protocol selector.