thesoftwarehouse/copilot-collections/tsh-implementing-observability

Claude Code and agent skill by thesoftwarehouse/copilot-collections

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Observability patterns for logging, monitoring, alerting, and distributed tracing. Use when implementing metrics collection, log aggregation, alerting rules, or distributed tracing across services.

Install

npx vskill@latest install thesoftwarehouse/copilot-collections/tsh-implementing-observability

SKILL.md

Observability Patterns

When to Use

  • Setting up monitoring and alerting for applications
  • Implementing centralized logging
  • Adding distributed tracing to microservices
  • Designing SLOs/SLIs and error budgets
  • Creating dashboards and runbooks

Three Pillars of Observability

PillarPurposeTools
MetricsQuantitative measurements over timePrometheus, CloudWatch, Datadog, Grafana
LogsDiscrete events with contextELK, Loki, CloudWatch Logs, Splunk
TracesRequest flow across servicesJaeger, Zipkin, X-Ray, Tempo

Stack Detection

Check which observability stack the project uses:

  • prometheus.yml or ServiceMonitor → Prometheus
  • fluent-bit.conf or fluentd.conf → Fluent Bit/Fluentd
  • otel-collector-config.yaml → OpenTelemetry
  • AWS with aws_cloudwatch_* resources → CloudWatch
  • datadog-agent or DD_* env vars → Datadog

Use context7 to look up stack-specific configuration syntax.

Solution Decision Matrix

Metrics Stack
ScenarioRecommended Solution
Kubernetes-native, cost-sensitivePrometheus + Grafana
AWS-native, simple setupCloudWatch Metrics
Multi-cloud, enterpriseDatadog or New Relic
OpenTelemetry-firstPrometheus with OTLP receiver
Logging Stack
ScenarioRecommended Solution
Kubernetes, cost-sensitiveLoki + Grafana
AWS-nativeCloudWatch Logs
High volume, complex queriesElasticsearch (ELK)
Multi-cloud, managedDatadog Logs or Splunk
Tracing Stack
ScenarioRecommended Solution
Kubernetes, open-sourceJaeger or Tempo
AWS-nativeX-Ray
Multi-cloud, correlatedDatadog APM
Vendor-agnosticOpenTelemetry → any backend

Kubernetes Observability Pattern

┌─────────────────────────────────────────────────────┐
│ Applications │
│ (instrumented with OpenTelemetry SDK or auto-inst) │
└──────────────────────┬──────────────────────────────┘
│ OTLP
▼
┌─────────────────────────────────────────────────────┐
│ OpenTelemetry Collector │
│ (receives, processes, exports telemetry) │
└───────┬─────────────────┬─────────────────┬─────────┘
│ │ │
▼ ▼ ▼
Prometheus Loki Tempo/Jaeger
(metrics) (logs) (traces)
│ │ │
└────────────────┬┴─────────────────┘
▼
Grafana
(visualization)

SLO/SLI Framework

Key Metrics (RED Method for Services)
MetricDescriptionExample SLI
RateRequests per secondrate(http_requests_total[5m])
ErrorsFailed requestsrate(http_requests_total{status=~"5.."}[5m])
DurationLatency distributionhistogram_quantile(0.99, rate(http_request_duration_seconds_bucket[5m]))
Key Metrics (USE Method for Resources)
MetricDescriptionExample
Utilization% time resource is busyCPU usage, memory usage
SaturationQueue depth, waitingPod pending, connection pool
ErrorsError countOOM kills, disk errors
SLO Definition Template
yaml
# Example: API availability SLO
slo:
name: api-availability
description: "API returns successful responses"
sli:
metric: |
sum(rate(http_requests_total{status!~"5.."}[5m]))
/
sum(rate(http_requests_total[5m]))
target: 99.9%
window: 30d
error_budget: 0.1% # ~43 minutes/month downtime allowed

Alerting Strategy

Alert Severity Levels
SeverityResponseExample
CriticalPage on-call immediatelyService down, data loss risk
WarningInvestigate within hoursError rate elevated, disk 80%
InfoReview during business hoursDeployment completed, scaling event
Alert Quality Rules
  • Actionable: Every alert must have a clear response action
  • Relevant: Alert on symptoms (user impact), not causes
  • Unique: Avoid duplicate alerts for same incident
  • Timely: Alert early enough to prevent impact
Alert Template (Prometheus)
yaml
groups:
- name: api-alerts
rules:
- alert: HighErrorRate
expr: |
sum(rate(http_requests_total{status=~"5.."}[5m]))
/
sum(rate(http_requests_total[5m])) > 0.01
for: 5m
labels:
severity: warning
annotations:
summary: "High error rate detected"
description: "Error rate is {{ $value | humanizePercentage }} (threshold: 1%)"
runbook_url: "https://runbooks.example.com/high-error-rate"

Structured Logging

Log Format (JSON)
json
{
"timestamp": "2024-01-15T10:30:00Z",
"level": "error",
"message": "Payment processing failed",
"service": "payment-api",
"trace_id": "abc123",
"span_id": "def456",
"user_id": "user-789",
"error": {
"type": "PaymentGatewayError",
"message": "Connection timeout"
},
"context": {
"payment_id": "pay-123",
"amount": 99.99
}
}
Required Log Fields
FieldPurposeCorrelation
timestampWhen event occurredTime-based queries
levelSeverity (debug/info/warn/error)Filtering
serviceSource service nameService filtering
trace_idDistributed trace identifierCross-service correlation
messageHuman-readable descriptionSearch

Process

  1. Discover context → Check existing observability setup (Prometheus, CloudWatch, etc.)
  2. Choose stack → Use decision matrix based on environment and requirements
  3. Instrument apps → Add OpenTelemetry SDK or auto-instrumentation
  4. Configure collection → Set up collectors, exporters, and storage
  5. Define SLOs → Establish SLIs, targets, and error budgets
  6. Create alerts → Implement actionable alerts with runbooks
  7. Build dashboards → Create service and infrastructure dashboards
  8. Document runbooks → Write response procedures for each alert

Checklist

  • [ ] All services emit metrics, logs, and traces
  • [ ] Trace IDs propagated across service boundaries
  • [ ] Structured logging with consistent format (JSON)
  • [ ] SLOs defined with error budgets
  • [ ] Alerts are actionable with runbook links
  • [ ] Dashboards show service health at a glance
  • [ ] Log retention policy configured
  • [ ] PII/sensitive data excluded from logs
  • [ ] On-call rotation defined for critical alerts

Anti-Patterns

Don'tDo
Alert on every metric thresholdAlert on user-impacting symptoms
Log everything at DEBUG in productionUse appropriate log levels
Unstructured log messagesStructured JSON logging
Missing trace contextPropagate trace IDs across services
Dashboards with 50+ panelsFocused dashboards per service/domain
Alerts without runbooksEvery alert links to response procedure
Store logs indefinitelyDefine retention based on compliance needs

Related Skills

  • tsh-implementing-kubernetes - For K8s-native observability setup
  • tsh-implementing-ci-cd - For pipeline observability integration
  • tsh-managing-secrets - For secure credential storage for observability tools

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
266
Repository forks
18
7-day trend score
28

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/thesoftwarehouse/copilot-collections/tsh-implementing-observability/badge)](https://verified-skill.com/skills/thesoftwarehouse/copilot-collections/tsh-implementing-observability)

Something wrong with this skill or its page? Tell us.