Repository navigation
fix(otel): redact invalid collector URLs and suppress implicit exporters - #118635
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 3, 2026, 7:19 AM ET / 11:19 UTC. ClawSweeper reviewWhat this changesThe PR validates all OpenTelemetry collector URL values that the trace, metric, and log exporters may consume, emits a credential-free error for invalid values, and passes explicit empty NodeSDK exporter arrays when a signal is disabled or separately owned. Merge readinessThe patch is a coherent owner-boundary repair for endpoint-derived credential exposure and unwanted NodeSDK defaults, with strong exact-head installed-SDK proof in the PR body. Keep it open for normal maintainer review because it intentionally changes implicit exporter behavior and the aggregate build/CI gates shown for this head are not yet green. Priority: P1 Review scores
Verification
How this fits togetherThe diagnostics-otel plugin combines OpenClaw configuration with OpenTelemetry environment variables, then constructs OTLP trace, metric, and log exporters. Those exporters send telemetry to a collector, while startup diagnostics report configuration failures to the operator. flowchart LR
A[OpenClaw OTEL config] --> C[Diagnostics OTEL plugin]
B[OTEL environment variables] --> C
C --> D[Signal endpoint resolution]
D --> E[URL validation and redaction]
E --> F[Trace metric and log exporters]
F --> G[Collector or stdout diagnostics]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +32, Tests +357. Total +389 across 4 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep validation at the diagnostics-otel exporter boundary, retain explicit NodeSDK ownership for each signal, and land after the exact head has clean required gates and the intentional ambient-exporter upgrade behavior is accepted. Do we have a high-confidence way to reproduce the issue? Yes, at source level: the PR's installed-SDK harness targets all three OTLP constructors with malformed endpoint variants, and current main forwards those values into exporter setup. This review could not execute the harness because the checkout lacks dependencies and cannot fetch missing blobs. Is this the best way to solve the issue? Yes, with the remaining upgrade check: the plugin owns final endpoint resolution and exporter construction, so validation there prevents credential-bearing SDK errors while explicit arrays prevent unintended default exporters. A downstream logging scrubber would be too late, and changing the documented per-signal contract would be broader. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against e87fb689b533. 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
HistoryReview history (1 earlier review cycle)
|
|
Merged via squash.
|
Maintainer upgrade decision
The plugin documentation already promises independent signal toggles and logs disabled by default. Ambient implicit NodeSDK exporters that silently bypass those explicit settings, redact/capture policy, or stdout-only mode are unintended behavior, not a supported upgrade contract. The maintainer intentionally accepts stopping those unintended default exporters; operators who want OTLP traces, metrics, or logs should enable the corresponding existing documented plugin signal. Valid explicitly enabled exporters, endpoint environment precedence, proxy/TLS settings, and stdout-only logging remain unchanged. The previously flaky unrelated TUI hosted build check was retried once and both exact-head build-artifacts and required openclaw/ci-gate are now SUCCESS.