Back to Skills

observability

verified

Logging, metrics, and distributed tracing. OpenTelemetry, Prometheus, Grafana, and production debugging.

View on GitHub

Marketplace

pluginagentmarketplace-backend

pluginagentmarketplace/custom-plugin-backend

Plugin

backend-development-assistant

Repository

pluginagentmarketplace/custom-plugin-backend
1stars

skills/observability/SKILL.md

Last Verified

January 20, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/pluginagentmarketplace/custom-plugin-backend/blob/main/skills/observability/SKILL.md -a claude-code --skill observability

Installation paths:

Claude
.claude/skills/observability/
Powered by add-skill CLI

Instructions

# Observability Skill

**Bonded to:** `backend-observability-agent` (Primary)

---

## Quick Start

```bash
# Invoke observability skill
"Set up structured logging for my application"
"Configure Prometheus metrics"
"Implement distributed tracing with OpenTelemetry"
```

---

## Three Pillars

| Pillar | Purpose | Tools |
|--------|---------|-------|
| Logs | What happened | ELK, Loki |
| Metrics | System state | Prometheus, Grafana |
| Traces | Request flow | Jaeger, OpenTelemetry |

---

## Examples

### Structured Logging
```python
import structlog

structlog.configure(
    processors=[
        structlog.processors.TimeStamper(fmt="iso"),
        structlog.processors.JSONRenderer()
    ]
)

logger = structlog.get_logger()

def process_request(request):
    log = logger.bind(
        correlation_id=request.headers.get("X-Correlation-ID"),
        user_id=request.user.id
    )
    log.info("request_started", method=request.method)
```

### Prometheus Metrics
```python
from prometheus_client import Counter, Histogram

REQUEST_COUNT = Counter('http_requests_total', 'Total requests', ['method', 'status'])
REQUEST_LATENCY = Histogram('http_request_duration_seconds', 'Request latency')

@REQUEST_LATENCY.time()
async def handle_request(request):
    response = await process(request)
    REQUEST_COUNT.labels(method=request.method, status=response.status_code).inc()
    return response
```

### OpenTelemetry Tracing
```python
from opentelemetry import trace

tracer = trace.get_tracer(__name__)

@tracer.start_as_current_span("process_order")
def process_order(order_id: str):
    span = trace.get_current_span()
    span.set_attribute("order.id", order_id)

    with tracer.start_as_current_span("validate"):
        validate(order_id)

    with tracer.start_as_current_span("charge"):
        charge(order_id)
```

---

## Key Metrics (RED Method)

| Metric | Description | Alert Threshold |
|--------|-------------|-----------------|
| Rate | Requests/sec | Drop > 50% |
| Errors |

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
2369 chars