Skip to content

fix(otel): redact invalid collector URLs and suppress implicit exporters - #118635

Merged
steipete merged 1 commit into
mainfrom
codex/qa0803-otel-endpoint-redaction
Aug 3, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/qa0803-otel-endpoint-redaction

Conversation

@steipete

@steipete steipete commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

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.

@openclaw-barnacle openclaw-barnacle Bot added extensions: diagnostics-otel Extension: diagnostics-otel size: M maintainer Maintainer-authored PR labels Aug 3, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. labels Aug 3, 2026
@clawsweeper

clawsweeper Bot commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 3, 2026, 7:19 AM ET / 11:19 UTC.

ClawSweeper review

What this changes

The 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 readiness

⚠️ Ready for maintainer review - 4 items remain

The 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
Reviewed head: 889c565c8e1fa167e3dc60a18fbab40c333f3b36

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Strong real behavior proof and focused owner-boundary coverage support the patch; final readiness depends on resolving the incomplete aggregate gates and confirming the intentional exporter-default change.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The PR body supplies exact-head, installed-SDK execution using the real NodeSDK and OTLP constructors, reports red-to-green malformed-input cases for every signal, zero network requests, and zero credential leaks.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The PR body supplies exact-head, installed-SDK execution using the real NodeSDK and OTLP constructors, reports red-to-green malformed-input cases for every signal, zero network requests, and zero credential leaks.
Evidence reviewed 7 items Current owner boundary: Current main resolves trace, metric, and log URLs and constructs OTLP exporters inside the diagnostics-otel service; without validation, those constructors receive configured or environment-derived endpoint values.
Patch behavior: The proposed exporter helper validates the raw signal/shared environment values, the shared value after the SDK signal-path transformation, and the final plugin-resolved URL before returning it; invalid candidates throw a fixed credential-free message.
Explicit exporter ownership: The branch gives NodeSDK explicit empty span-processor, metric-reader, and log-record-processor arrays when OpenClaw does not own those exporters, rather than allowing SDK defaults to decide from ambient environment variables.
Findings None None.
Security None None.

How this fits together

The 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]
Loading

Before merge

  • Resolve merge risk (P1) - Merging deliberately suppresses OpenTelemetry NodeSDK implicit exporters for signals OpenClaw does not explicitly configure; installations that relied on ambient OTEL exporter defaults need the intended upgrade behavior confirmed before merge.
  • Resolve merge risk (P1) - The supplied aggregate build-artifacts and openclaw/ci-gate checks are failing and another real-behavior-proof run is in progress, so repository integration is not yet proven on the reviewed head.
  • Resolve merge risk (P1) - Direct inspection of the pinned OpenTelemetry dependency source was unavailable in this read-only environment because dependencies were absent and the promisor remote could not resolve; the PR's installed-SDK proof reduces but does not remove that review-evidence gap.
  • Complete next step (P2) - The patch has no discrete mechanical defect, but the protected maintainer label, unfinished aggregate gates, and intentional implicit-exporter compatibility change require maintainer handling before merge.
Agent review details

Security

None.

PR surface

Source +32, Tests +357. Total +389 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 2 69 37 +32
Tests 2 365 8 +357
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 434 45 +389

Review metrics

Metric Value Why it matters
Production versus regression coverage production +32 net, tests +357 net The production growth is limited to endpoint-validation and explicit exporter-ownership invariants, while the added coverage exercises all three OTLP signals and the real installed SDK.
Implicit exporter controls 3 explicit empty NodeSDK arrays The branch changes default exporter behavior for traces, metrics, and logs, which is the central compatibility decision before merge.

Merge-risk options

Maintainer options:

  1. Verify the explicit-exporter upgrade path (recommended)
    Resolve the current aggregate check failures and confirm that disabling ambient NodeSDK exporters preserves all documented explicit trace, metric, log, stdout, and preloaded-SDK modes.
  2. Accept the narrower exporter contract
    Maintainers may intentionally accept that only OpenClaw-configured exporters are created, documenting that ambient SDK exporter defaults are no longer a supported path.

Technical review

Best 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.

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • remove rating: 🦞 diamond lobster: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.

Label justifications:

  • P1: This patch addresses credential-bearing telemetry startup failures and unwanted exporter activation in a user-configurable diagnostics path.
  • merge-risk: 🚨 compatibility: Explicit empty NodeSDK exporter arrays can change behavior for existing installations that relied on ambient OpenTelemetry exporter configuration.
  • merge-risk: 🚨 security-boundary: The patch changes whether malformed collector URLs containing credentials can reach SDK constructors, diagnostic output, or exception stacks.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body supplies exact-head, installed-SDK execution using the real NodeSDK and OTLP constructors, reports red-to-green malformed-input cases for every signal, zero network requests, and zero credential leaks.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body supplies exact-head, installed-SDK execution using the real NodeSDK and OTLP constructors, reports red-to-green malformed-input cases for every signal, zero network requests, and zero credential leaks.

Evidence

What I checked:

  • Current owner boundary: Current main resolves trace, metric, and log URLs and constructs OTLP exporters inside the diagnostics-otel service; without validation, those constructors receive configured or environment-derived endpoint values. (extensions/diagnostics-otel/src/service.ts:144, e87fb689b533)
  • Patch behavior: The proposed exporter helper validates the raw signal/shared environment values, the shared value after the SDK signal-path transformation, and the final plugin-resolved URL before returning it; invalid candidates throw a fixed credential-free message. (extensions/diagnostics-otel/src/service-exporter.ts:46, 889c565c8e1f)
  • Explicit exporter ownership: The branch gives NodeSDK explicit empty span-processor, metric-reader, and log-record-processor arrays when OpenClaw does not own those exporters, rather than allowing SDK defaults to decide from ambient environment variables. (extensions/diagnostics-otel/src/service.ts:228, 889c565c8e1f)
  • Documented configuration contract: The public OpenTelemetry documentation defines independently toggled trace, metric, and log signals, with logs optionally sent only to stdout; this supports preventing a disabled signal from creating an ambient OTLP exporter. Public docs: docs/gateway/opentelemetry.md. (docs/gateway/opentelemetry.md:73, e87fb689b533)
  • Regression coverage and supplied runtime proof: The branch adds real installed-SDK tests covering malformed configured, signal-environment, shared-environment, Unicode-prefixed, and path-appended URLs across all three signals, plus disabled-signal exporter cases. Its PR body reports exact-head constructor execution with 0 credential leaks and 0 network requests. (extensions/diagnostics-otel/src/service.otlp-export.test.ts:345, 889c565c8e1f)
  • Recent ownership provenance: The immediately preceding current-main repair on this exporter path is the proxy fail-closed change by steipete, tying the same contributor to the existing startup-redaction boundary rather than only this proposed branch. (extensions/diagnostics-otel/src/service-exporter.ts:118, 56f02c495600)

Likely related people:

  • steipete: Authored the adjacent current-main OTEL proxy fail-closed/redaction repair and the proposed endpoint/exporter repair, indicating direct continuity on this startup boundary. (role: recent area contributor; confidence: high; commits: 56f02c495600, 889c565c8e1f; files: extensions/diagnostics-otel/src/service.ts, extensions/diagnostics-otel/src/service-exporter.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Resolve or rerun the failed build-artifacts and openclaw/ci-gate checks on the exact head.
  • Confirm the upgrade expectation for installations that previously relied on ambient OpenTelemetry exporter defaults.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-08-03T11:12:39.392Z sha 889c565 :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. labels Aug 3, 2026
@steipete
steipete merged commit 629bf6f into main Aug 3, 2026
199 of 213 checks passed
@steipete
steipete deleted the codex/qa0803-otel-endpoint-redaction branch August 3, 2026 11:24
@steipete

steipete commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: diagnostics-otel Extension: diagnostics-otel maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant