observability-monitoring
Skill8 starsChanged 10 months agoMITView on GitHub
Observability and monitoring patterns including logging, metrics, distributed tracing, alerting, and monitoring stack setup. Use when setting up monitoring, implementing logging strategies, configuring alerts, or debugging production issues.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- zavora-ai/skill-observability-monitoringtheir own version, first seen May 31, 2026
- yiweiwan/skillstheir own version, first seen May 12, 2026
- AnastasiyaW/codex-claude-code-configtheir own version, first seen Apr 23, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- AnastasiyaW/codex-claude-code-config★ 153same name
- yiweiwan/skills★ 1same name
- zavora-ai/skill-observability-monitoring★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository45 other files it gives its agents.
- AGENTS.mdAGENTS.md
- api-rest-designSkill
- brandkitSkill
- industrial-brutalist-uiSkill
- bug-fixingSkill
- ci-cd-pipelinesSkill
- code-documentationSkill
- context7Skill
- design-an-interfaceSkill
- docker-patternsSkill
- feature-developmentSkill
- frontend-designSkill
- git-commitSkill
- git-releaseSkill
- git-team-workflowSkill
- go-conventionsSkill
- gpt-tasteSkill
- imagegen-frontend-mobileSkill
- imagegen-frontend-webSkill
- image-to-codeSkill
- issue-writingSkill
- kubernetes-patternsSkill
- microservices-patternsSkill
- minimalist-uiSkill
- mongodb-patternsSkill
- full-output-enforcementSkill
- performance-optimizationSkill
- postgresql-patternsSkill
- prdSkill
- pr-writingSkill
- python-patternsSkill
- redesign-existing-projectsSkill
- refactoring-safelySkill
- rust-patternsSkill
- security-best-practicesSkill
- skill-creatorSkill
- high-end-visual-designSkill
- spec-driven-developmentSkill
- sqlserver-patternsSkill
- stitch-design-tasteSkill
- task-managementSkill
- design-taste-frontendSkill
- testing-strategiesSkill
- ts-react-nextjsSkill
- ts-vue-svelteSkill
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 229
Use this skill when:
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Observability & Monitoring Skill
Overview
This skill provides comprehensive observability patterns including structured logging, metrics collection, distributed tracing, alerting, and setting up monitoring stacks (Prometheus, Grafana, ELK, Jaeger).
Quick Start
Observability Checklist
- Structured logging implemented
- Request/response logging
- Error tracking with context
- Performance metrics exposed
- Health checks configured
- Distributed tracing enabled
- Alerts configured
- Dashboards created
Three Pillars of Observability
- Logs - Discrete events (what happened)
- Metrics - Numeric data over time (how much/how often)
- Traces - Request flow through system (where time spent)
Structured Logging
Python with structlog
import structlog
import logging
from datetime import datetime
# Configure structured logging
structlog.configure(
processors=[
structlog.stdlib.filter_by_level,
structlog.stdlib.add_logger_name,
structlog.stdlib.add_log_level,
structlog.stdlib.PositionalArgumentsFormatter(),
structlog.processors.TimeStamper(fmt="iso"),
structlog.processors.StackInfoRenderer(),
structlog.processors.format_exc_info,
structlog.processors.UnicodeDecoder(),
structlog.processors.JSONRenderer()
],
context_class=dict,
logger_factory=structlog.stdlib.LoggerFactory(),
wrapper_class=structlog.stdlib.BoundLogger,
cache_logger_on_first_use=True,
)
logger = structlog.get_logger()
# Usage
logger.info("user_login", user_id="123", ip="192.168.1.1", user_agent="Mozilla/5.0")
logger.error("database_connection_failed",
error="Connection timeout",
retry_count=3,
connection_string="postgresql://localhost:5432/mydb")Request Logging Middleware
import time
import uuid
from fastapi import Request
class RequestLoggingMiddleware:
async def __call__(self, request: Request, call_next):
request_id = str(uuid.uuid4())
start_time = time.time()
# Bind request context
structlog.contextvars.clear_contextvars()
structlog.contextvars.bind_contextvars(
request_id=request_id,
method=request.method,
path=request.url.path,
user_agent=request.headers.get('user-agent'),
ip=request.client.host
)
logger.info("request_started")
try:
response = await call_next(request)
duration = time.time() - start_time
logger.info("request_completed",
status_code=response.status_code,
duration_ms=round(duration * 1000, 2))
response.headers['X-Request-ID'] = request_id
return response
except Exception as e:
duration = time.time() - start_time
logger.error("request_failed",
error=str(e),
error_type=type(e).__name__,
duration_ms=round(duration * 1000, 2))
raiseMetrics
Prometheus Metrics
from prometheus_client import Counter, Histogram, Gauge, Info, generate_latest
from fastapi import FastAPI, Response
app = FastAPI()
# Define metrics
REQUEST_COUNT = Counter(
'http_requests_total',
'Total HTTP requests',
['method', 'endpoint', 'status_code']
)
REQUEST_DURATION = Histogram(
'http_request_duration_seconds',
'HTTP request duration',
['method', 'endpoint'],
buckets=[0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1.0, 2.5, 5.0, 10.0]
)
ACTIVE_CONNECTIONS = Gauge(
'active_connections',
'Number of active connections'
)
APP_INFO = Info('app', 'Application information')
# Set app info
APP_INFO.info({'version': '1.0.0', 'build_date': '2024-01-15'})
@app.middleware("http")
async def metrics_middleware(request, call_next):
ACTIVE_CONNECTIONS.inc()
start_time = time.time()
response = await call_next(request)
duration = time.time() - start_time
REQUEST_COUNT.labels(
method=request.method,
endpoint=request.url.path,
status_code=response.status_code
).inc()
REQUEST_DURATION.labels(
method=request.method,
endpoint=request.url.path
).observe(duration)
ACTIVE_CONNECTIONS.dec()
return response
@app.get("/metrics")
def metrics():
return Response(generate_latest(), media_type="text/plain")Distributed Tracing
OpenTelemetry
from opentelemetry import trace
from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import OTLPSpanExporter
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import BatchSpanProcessor
from opentelemetry.instrumentation.fastapi import FastAPIInstrumentor
from opentelemetry.instrumentation.requests import RequestsInstrumentor
# Configure tracing
trace.set_tracer_provider(TracerProvider())
tracer = trace.get_tracer(__name__)
# Export to Jaeger/Tempo
otlp_exporter = OTLPSpanExporter(endpoint="http://jaeger:4317")
span_processor = BatchSpanProcessor(otlp_exporter)
trace.get_tracer_provider().add_span_processor(span_processor)
# Instrument FastAPI
app = FastAPI()
FastAPIInstrumentor.instrument_app(app)
RequestsInstrumentor().instrument()
# Manual instrumentation
@app.get("/orders/{order_id}")
async def get_order(order_id: str):
with tracer.start_as_current_span("get_order") as span:
span.set_attribute("order.id", order_id)
with tracer.start_as_current_span("fetch_from_database"):
order = await db.get_order(order_id)
with tracer.start_as_current_span("enrich_order_data"):
order['user'] = await user_service.get_user(order['user_id'])
span.set_attribute("order.status", order['status'])
return orderDetailed References
See comprehensive guides in references/:
- Logging - Structured logging, log aggregation, ELK stack
- Metrics - Prometheus, Grafana dashboards, custom metrics
- Tracing - OpenTelemetry, Jaeger, distributed tracing patterns
- Alerting - Prometheus Alertmanager, PagerDuty, SLOs/SLIs
When to Use This Skill
Use this skill when:
- Setting up application monitoring
- Implementing structured logging
- Configuring metrics collection
- Debugging production issues
- Setting up distributed tracing
- Creating dashboards and alerts
- Defining SLOs and SLIs
- Investigating performance issues
Related Skills
@kubernetes-patterns- Kubernetes monitoring and logging@docker-patterns- Container monitoring@microservices-patterns- Distributed tracing for microservices@performance-optimization- Performance profiling@security-best-practices- Security monitoring
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.

