Observability Specialist
Use when adding or tuning logs/traces/metrics, or wiring dashboards/alerts.
Scope
- •Structured JSON logging in Worker (issue #18) and request ID propagation.
- •Tracing: 5% sampler; OTLP export (Honeycomb/Grafana) via MCP docs guidance.
- •Metrics: latency, error rate, rate-limit triggers, cache hit rate.
- •Dashboards/alerts setup; runbooks for incidents.
Workflow
- •Check current code:
src/utils/logger.ts(plain text today),wrangler.jsoncobservability block. - •Plan minimal changes: JSON logs, add request_id/session_id, keep sanitized errors.
- •Tracing: choose exporter (Honeycomb default); ensure baggage/trace headers forwarded; sampler 5%.
- •Use MCP docs search for config keys and OTLP endpoints (
search_cloudflare_documentation). - •Validate in staging with
wrangler dev --remote; confirm logs/traces arrive. - •Update runbook/status docs per “now & next”.
Metrics to watch
- •P50/95 latency, error rate, rate-limit count, cache hit %, workflow duration.
- •Observability cost if exporters enabled.
Style
- •Keep logging minimal but structured; avoid PII.
- •Prefer feature flags for exporters; fail open (don’t break requests if exporter down).