observability
Use when the user asks about adding observability to a service: logs, metrics and traces, structured JSON logging, how to instrument services with…
от j4flmao★ 47 звёзд на GitHub
Установить observability в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Observability
Purpose
Set up structured logging, metrics, and distributed tracing to understand system behavior in production.
Agent Protocol
Trigger
Exact user phrases: "observability", "logging", "metrics", "tracing", "OpenTelemetry", "Grafana", "Prometheus", "structured logs", "distributed tracing", "monitoring".
Input Context
Before activating, verify:
- The stack is known (for OpenTelemetry SDK selection).
- The existing observability tooling is understood (Prometheus, Grafana, etc.).
- The traffic volume is known (for trace sampling strategy).
Output Artifact
No file output. This skill produces an observability plan.
Response Format
Observability plan: logging format, metrics list, trace sampling strategy, SLOs, alert rules.
No preamble. No postamble. No explanations. No filler/hedging/transitions. Compress output — why use many token when few do trick. No explanation of why observability is important.
Completion Criteria
This skill is complete when:
- Structured JSON logging format is defined with required fields.
- Key metrics are listed (counters, gauges, histograms).
- Trace sampling strategy is specified.
- SLOs are defined with SLIs.
- Alert rules follow symptom-based (not cause-based) design.
Max Response Length
40 lines.
Quick Start
Three pillars: logs (what happened), metrics (how often/how much), traces (where it happened). Use JSON structured logging. OpenTelemetry for traces. Alert on symptoms (user impact), not causes.
Decision Tree: Observability Strategy
- New microservice, no existing observability → Structured JSON logs + RED metrics + OpenTelemetry traces at 10% sampling
- Existing service with basic monitoring → Add distributed tracing, define SLOs, implement burn-rate alerts
- High-traffic service (>10k req/s) → Tail-based sampling, cardinality management, log sampling
- Compliance-heavy environment (PCI/HIPAA) → Structured logging with PII redaction, audit trails, trace sampling + attribute filtering
- Serverless/event-driven → Distributed context propagation, structured logs with correlation IDs, metrics on function duration
Logging vs Metrics vs Traces Decision
What do you need to understand?
├── What happened? → Logs (structured, searchable, correlated)
├── How often / how much? → Metrics (counters, gauges, histograms)
├── Where did it happen in the request path? → Traces (span tree, timing)
└── All three → OpenTelemetry SDK + log correlation (traceId in logs)
Sampling Strategy Decision
What is the request rate?
├── < 100 req/s → 100% sampling (cheap enough to keep everything)
├── 100-1000 req/s → 10% head-based probabilistic
├── 1000-10000 req/s → 1% head-based + tail-based for errors/slow
└── > 10000 req/s → Rate-limited (100 traces/sec) + tail-based for errors
Core Workflow
Step 1: Structured Logging
// GOOD — structured JSON
{
"level": "error",
"message": "Payment processing failed",
"service": "order-service",
"traceId": "abc123",
"userId": "user-456",
"orderId": "order-789",
"error": {
"type": "PaymentTimeoutError",
"message": "Payment gateway timeout after 30s",
"stack": "..."
},
"duration_ms": 30042,
"timestamp": "2026-05-14T10:30:00Z"
}
// BAD — unstructured text: "Error processing order: something went wrong"
Required fields: level, message, service, timestamp, traceId
Context fields: userId, orderId, requestId, duration_ms
Step 2: Metrics — RED Method (for services)
| Metric | Type | Example |
|---|---|---|
| Rate | Counter | http_requests_total{method, path, status} |
| Errors | Counter | http_requests_errors_total{method, path, status} |
| Duration | Histogram | http_request_duration_seconds{method, path} |
Step 3: Metrics — USE Method (for infrastructure)
| Metric | Type | Example |
|---|---|---|
| Utilization | Gauge | cpu_usage_ratio, memory_usage_bytes |
| Saturation | Gauge | queue_depth, disk_io_wait_seconds |
| Errors | Counter | disk_io_errors_total, network_drops_total |
Step 4: Key Metrics for Every Service
# Request rate
sum(rate(http_requests_total[5m])) by (service, method, path)
# Error rate
sum(rate(http_requests_total{status=~"5.."}[5m])) by (service)
# Latency p99
histogram_quantile(0.99, sum(rate(http_request_duration_seconds_bucket[5m])) by (le, service))
# Active requests
sum(http_requests_active) by (service)
# SLO burn rate
(
sum(rate(http_requests_total{status!~"5.."}[1h]))
/
sum(rate(http_requests_total[1h]))
)
Step 5: Prometheus Recording Rules
groups:
- name: service_slos
interval: 30s
rules:
- record: service:error_rate_5m
expr: |
sum(rate(http_requests_total{status=~"5.."}[5m])) by (service)
/
sum(rate(http_requests_total[5m])) by (service)
- record: service:latency_p99_5m
expr: |
histogram_quantile(0.99,
sum(rate(http_r
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- prometheus-grafana/SKILL.md
- references/alerting-strategies.md
- references/custom-metrics.md
- references/log-aggregation.md
- references/observability-advanced.md
- references/observability-cost.md
- references/observability-fundamentals.md
- references/observability-maturity.md
- references/otel-guide.md
FAQ
Что делает скилл observability?
Use when the user asks about adding observability to a service: logs, metrics and traces, structured JSON logging, how to instrument services with OpenTelemetry traces per stack, SLIs, and alerting on symptoms not causes. Produces a per-service observability baseline. Not for Collector pipelines and sampling (use devops-opentelemetry) or Prometheus setup (use prometheus-grafana).
Как установить скилл observability?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл observability запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
ci-review
AnthropicThe scan that the plugin's GitHub Action runs.
azure-static-web-apps
GitHubHelps create, configure, and deploy Azure Static Web Apps using the SWA CLI. Use when deploying static sites to Azure, setting up SWA local development…
ai-ready
GitHubMake any repo AI-ready — analyzes your codebase and generates AGENTS.md, copilot-instructions.md, CI workflows, issue templates, and more. Mines your PR…
aws-cdk-python-setup
GitHubSetup and initialization guide for developing AWS CDK (Cloud Development Kit) applications in Python. This skill enables users to configure environment…