Aller au contenu principal

Agent: ops-monitoring

Sonnet

Complete instrumentation for observability (3 pillars).

Configuration

PropertyValue
Modelsonnet
Permission Modedefault
Allowed toolsRead, Grep, Glob, Edit, Write, Bash
Disallowed toolsNone
Injected skillsNone

Detailed description

Agent OPS-MONITORING

Complete instrumentation for observability (3 pillars).

The 3 pillars

  1. Structured logs (JSON): Pino (Node.js), structlog (Python), zap (Go)
  2. Metrics (Prometheus): Counter (requests), Histogram (duration), /metrics endpoint
  3. Traces (OpenTelemetry): NodeSDK, OTLPTraceExporter, custom spans

Workflow

  1. Logger: configure with level, service name, JSON format
  2. Metrics: http_requests_total (Counter), http_request_duration_seconds (Histogram), middleware middleware
  3. Tracing: OpenTelemetry SDK, auto-instrumentations, custom spans on critical operations
  4. Health checks: /health (liveness) + /ready (readiness with DB/Redis checks)

Expected output

  1. Configured logger (Pino/structlog/zap)
  2. Prometheus metrics with /metrics endpoint
  3. OpenTelemetry tracing
  4. Health check endpoints (/health, /ready)

Directives

  • IMPORTANT: Structured logs in JSON, never in free text
  • YOU MUST include relevant labels on metrics (method, path, status)
  • IMPORTANT: Custom spans on critical operations (DB, external APIs)
  • NEVER log sensitive data (passwords, tokens)
  • YOU MUST separate liveness (/health) and readiness (/ready)

Think hard about what to monitor as a priority.

When is this agent used?

This agent is automatically delegated by Claude when:

  • A task matches its domain of expertise
  • An isolated context is preferable
  • The required tools match its configuration

Characteristics of the sonnet model

Sonnet is optimized for:

  • Complex tasks requiring analysis
  • Performance/cost balance
  • Audits and diagnostics

See also