You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No metrics instrumentation exists. For a security-critical system, observability into request rates, error rates, grant decisions, and connector health is non-negotiable.
Required work
Add Prometheus client dependency and /metrics endpoint
Request metrics: counter and histogram by endpoint, method, status code
Session metrics: gauge of active sessions by tenant, counter of sessions created/revoked/expired
Grant metrics: counter by outcome (issued, denied, pending, revoked, expired), histogram of grant TTLs
Approval metrics: counter by outcome (approved, denied, expired), histogram of approval wait time
Artifact metrics: gauge of active artifacts by connector kind, counter of unwrap operations
Connector metrics: counter and latency histogram per connector per operation (GitHub API calls, Vault credential fetches, lease revocations)
Policy metrics: counter of policy evaluation outcomes (allowed, denied) by capability
Budget metrics: counter of budget exhaustion events per handle
Cleanup worker metrics: counter of items processed per type per pass, histogram of pass duration
Summary
No metrics instrumentation exists. For a security-critical system, observability into request rates, error rates, grant decisions, and connector health is non-negotiable.
Required work
/metricsendpointFiles
internal/metrics/with metric registrationinternal/api/httpapi/server.go— middleware for request metricsinternal/app/service.go— instrument decision pointsinternal/connectors/*/— instrument external callsinternal/worker/runner.go— instrument cleanup passescmd/asb-api/main.go— register/metricshandlerPriority
High — required for operational visibility.
🤖 Generated with Claude Code