fabrico-implementing-observability
Skill2 starsChanged 4 months agoMITView on GitHub
Observability patterns for logging, monitoring, alerting, and distributed tracing. Use when implementing metrics collection, log aggregation, alerting rules, or distributed tracing across services.
In this repository42 other files it gives its agents.
- docs/agents.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- fabrico-architecture-designingSkill
- fabrico-building-admin-dashboardsSkill
- fabrico-building-admin-resourcesSkill
- fabrico-building-lean-applicationsSkill
- fabrico-codebase-analysingSkill
- fabrico-code-reviewingSkill
- fabrico-creating-agentsSkill
- fabrico-creating-instructionsSkill
- fabrico-creating-promptsSkill
- fabrico-creating-skillsSkill
- fabrico-designing-multi-cloud-architectureSkill
- fabrico-e2e-testingSkill
- fabrico-engineering-promptsSkill
- fabrico-ensuring-accessibilitySkill
- fabrico-implementation-gap-analysingSkill
- fabrico-implementing-backendSkill
- fabrico-implementing-ci-cdSkill
- fabrico-implementing-formsSkill
- fabrico-implementing-frontendSkill
- fabrico-implementing-kubernetesSkill
- fabrico-implementing-terraform-modulesSkill
- fabrico-improving-codebasesSkill
- fabrico-improving-uiSkill
- fabrico-jira-task-formattingSkill
- fabrico-managing-secretsSkill
- fabrico-optimizing-cloud-costSkill
- fabrico-optimizing-frontendSkill
- fabrico-planning-migrationSkill
- fabrico-preparing-applications-for-aiSkill
- fabrico-preparing-applications-for-saasSkill
- fabrico-reverse-engineering-specSkill
- fabrico-reviewing-frontendSkill
- fabrico-sql-and-database-understandingSkill
- fabrico-task-analysingSkill
- fabrico-task-extractingSkill
- fabrico-task-quality-reviewingSkill
- fabrico-technical-context-discoveringSkill
- fabrico-transcript-processingSkill
- fabrico-ui-verifyingSkill
- fabrico-writing-hooksSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 26
Check which observability stack the project uses:
- Very specific: line 33
Use the context7 MCP server (tools mcp__context7__*) to look up stack-specific configuration syntax.
- Distinctive: line 135
Actionable: Every alert must have a clear response action
- Distinctive: line 137
Unique: Avoid duplicate alerts for same incident
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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
| Pillar | Purpose | Tools |
| Metrics | Quantitative measurements over time | Prometheus, CloudWatch, Datadog, Grafana |
| Logs | Discrete events with context | ELK, Loki, CloudWatch Logs, Splunk |
| Traces | Request flow across services | Jaeger, Zipkin, X-Ray, Tempo |
Stack Detection
Check which observability stack the project uses:
prometheus.ymlorServiceMonitor→ Prometheusfluent-bit.conforfluentd.conf→ Fluent Bit/Fluentdotel-collector-config.yaml→ OpenTelemetry- AWS with
aws_cloudwatch_*resources → CloudWatch datadog-agentorDD_*env vars → Datadog
Use the context7 MCP server (tools mcp__context7__*) to look up stack-specific configuration syntax.
Solution Decision Matrix
Metrics Stack
| Scenario | Recommended Solution |
| Kubernetes-native, cost-sensitive | Prometheus + Grafana |
| AWS-native, simple setup | CloudWatch Metrics |
| Multi-cloud, enterprise | Datadog or New Relic |
| OpenTelemetry-first | Prometheus with OTLP receiver |
Logging Stack
| Scenario | Recommended Solution |
| Kubernetes, cost-sensitive | Loki + Grafana |
| AWS-native | CloudWatch Logs |
| High volume, complex queries | Elasticsearch (ELK) |
| Multi-cloud, managed | Datadog Logs or Splunk |
Tracing Stack
| Scenario | Recommended Solution |
| Kubernetes, open-source | Jaeger or Tempo |
| AWS-native | X-Ray |
| Multi-cloud, correlated | Datadog APM |
| Vendor-agnostic | OpenTelemetry → 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)
| Metric | Description | Example SLI |
| Rate | Requests per second | rate(http_requests_total[5m]) |
| Errors | Failed requests | rate(http_requests_total{status=~"5.."}[5m]) |
| Duration | Latency distribution | histogram_quantile(0.99, rate(http_request_duration_seconds_bucket[5m])) |
Key Metrics (USE Method for Resources)
| Metric | Description | Example |
| Utilization | % time resource is busy | CPU usage, memory usage |
| Saturation | Queue depth, waiting | Pod pending, connection pool |
| Errors | Error count | OOM kills, disk errors |
SLO Definition Template
# 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 allowedAlerting Strategy
Alert Severity Levels
| Severity | Response | Example |
| Critical | Page on-call immediately | Service down, data loss risk |
| Warning | Investigate within hours | Error rate elevated, disk 80% |
| Info | Review during business hours | Deployment 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)
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)
{
"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
| Field | Purpose | Correlation |
timestamp | When event occurred | Time-based queries |
level | Severity (debug/info/warn/error) | Filtering |
service | Source service name | Service filtering |
trace_id | Distributed trace identifier | Cross-service correlation |
message | Human-readable description | Search |
Process
- Discover context → Check existing observability setup (Prometheus, CloudWatch, etc.)
- Choose stack → Use decision matrix based on environment and requirements
- Instrument apps → Add OpenTelemetry SDK or auto-instrumentation
- Configure collection → Set up collectors, exporters, and storage
- Define SLOs → Establish SLIs, targets, and error budgets
- Create alerts → Implement actionable alerts with runbooks
- Build dashboards → Create service and infrastructure dashboards
- 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't | Do |
| Alert on every metric threshold | Alert on user-impacting symptoms |
| Log everything at DEBUG in production | Use appropriate log levels |
| Unstructured log messages | Structured JSON logging |
| Missing trace context | Propagate trace IDs across services |
| Dashboards with 50+ panels | Focused dashboards per service/domain |
| Alerts without runbooks | Every alert links to response procedure |
| Store logs indefinitely | Define retention based on compliance needs |
Related Skills
fabrico-implementing-kubernetes- For K8s-native observability setupfabrico-implementing-ci-cd- For pipeline observability integrationfabrico-managing-secrets- For secure credential storage for observability tools
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

