Skip to content

Step 2.6.3: Add observability metrics for ACP runtime denylist enforcement #98

Description

@coderabbitai

Background

This issue tracks the metrics specification and implementation work deferred from Step 2.6.2 (PR #90) to Step 2.6.3.

The ACP runtime denylist enforcement introduced in Step 2.6.2 provides only tracing::warn! denial lines on podbot::acp::policy. This was flagged as an observability warning during the PR review and explicitly deferred in the exec plan's Outcomes and retrospective:

"Step 2.6.3: enrich denial diagnostics, e.g. structured stderr with a per-session counter or an OpenTelemetry-style metric so operators can dashboard denial rates without grepping logs."

Missing observability

The following metrics are absent from both the implementation and the exec plan specification:

  • Blocked method attempt counters — per-session and aggregate counts of ACP method calls rejected by the runtime denylist.
  • Enforcement policy state gauge — indicates which CapabilityPolicy variant (Disabled, MaskOnly, MaskAndDeny) is active for a given session.
  • WriteCmd channel queue depth and send-failure metrics — bounded mpsc channel saturation and dropped-send events.
  • Frame buffer overflow counters — counts of frames that exceeded MAX_RUNTIME_FRAME_BYTES and triggered the raw-fallback path.
  • Distributed tracing spans — spans covering the deny decision, JSON-RPC error synthesis, and sink-task write operations.

Acceptance criteria

  • Metrics are specified in the Step 2.6.3 exec plan before implementation begins.
  • All five metric categories above are covered.
  • Metrics are emitted via an OpenTelemetry-compatible interface (or a clearly justified alternative).
  • Operator documentation is updated to describe available metrics and recommended alert thresholds.
  • The observability custom check passes on the implementation PR.

References

Raised by @leynos.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions