Skip to content

feat: add managed OpenTelemetry diagnostics - #7

Merged
steipete merged 3 commits into
mainfrom
feat/otel-diagnostics
Jul 5, 2026
Merged

steipete merged 3 commits into
mainfrom
feat/otel-diagnostics

Conversation

@steipete

@steipete steipete commented Jul 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • add managed, metadata-only OTLP trace and metric policy with HTTPS-only base endpoints, standard signal paths, and log export disabled
  • bundle the pinned @openclaw/diagnostics-otel plugin and recursively verify its offline runtime dependency graph
  • apply OTel policy through both standalone bootstrap and native child protocol v2, repairing the exact managed plugin allowlist, with legacy-record migration and fail-closed version gates
  • bind standalone readiness to the exact downloaded managed spec and clear policy-scoped retry markers after success

Inspired by the OpenTelemetry integration in redhat-et/claw-operator, adapted to Crabhelm's managed-spec and immutable-appliance model.

Verification

  • pnpm check — 110 tests, TypeScript, Worker typecheck, Wrangler dry-run
  • complete-branch autoreview plus focused follow-up review — clean after the managed-allowlist repair
  • source-blind API validation — valid OTel policy persisted exactly; HTTP endpoint, log export, and string boolean inputs rejected with 422; failed writes did not change fleet count

Rollout prerequisite

Draft until a reviewed appliance is built and uploaded, then APPLIANCE_ARCHIVE_SHA256 and APPLIANCE_MANIFEST_SHA256 are updated to its verified digests. Existing default-policy claws remain compatible with the legacy readiness marker. OTel or non-default logging fails closed with policy-upgrade-required until the policy-aware appliance is pinned.

@steipete
steipete marked this pull request as ready for review July 5, 2026 19:36
@steipete
steipete merged commit 3a69582 into main Jul 5, 2026
@steipete
steipete deleted the feat/otel-diagnostics branch July 5, 2026 19:36

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e5803121a0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/node-control.ts
Comment on lines +912 to +916
enabled:
diagnosticsAllowed &&
diagnosticsEntry.enabled === true &&
diagnostics.enabled === true &&
diagnosticsOtel.enabled === true &&

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Reconcile drift that enables telemetry content capture

When a child has OTEL enabled but diagnostics.otel.captureContent is later changed on disk to capture prompts, responses, tool inputs, etc., this readback still returns the same managed state because it only checks the top-level OTEL gates/endpoints and never folds the captureContent flags into managedHash. In that scenario the parent reports the policy as converged and will not reapply the managed config that disables content capture, which breaks the metadata-only guarantee for managed diagnostics.

Useful? React with 👍 / 👎.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant