mcpbeat

Common Observability

hoangnguyen0403/common-observability

Enforce structured JSON logging, OpenTelemetry distributed tracing, and RED metrics across backend services. Use when adding request correlation, setting up tracing spans, defining SLO burn-rate alerts, or instrumenting middleware.

1k tokens
context cost
the whole folder, loaded on every use
4
files
instructions only
0
copies elsewhere
how many repositories repackaged it
536
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/HoangNguyen0403/agent-skills-standard --skill common-observability

What comes with it

3 194 bytes besides the instruction
evals/evals.json
references/implementation.md
references/observability-formats.md

The instruction itself

7 sections, as written by the author

Common Observability Standards

Priority: P1 (HIGH)

Logging & Tracing

  • JSON Logs: Always emit JSON structured logs. Never plain-text in prod.
  • Correlation: Extract X-Request-Id or traceparent. Attach to async context.
  • Tracing: Use OpenTelemetry. Propagate W3C traceparent.
  • Spans: Name spans like <HTTP_METHOD> <route> (GET /users/:id).

See implementation examples for structured logger setup with Pino.

Metrics

  • Required: Request rate, Error rate, Latency histogram (p50/p95/p99), Saturation.
  • SLOs: Alert on SLO burn rates, not raw threshold spikes.

Instrumentation Workflow

  • Define the operation and route-normalized span name before adding code.
  • Propagate request/trace context across every async or service boundary.
  • Log one structured event with correlation fields; redact secrets and request bodies.
  • Add RED metrics with route-safe labels, then define an SLO and burn-rate alert.
  • Exercise a success and failure path; confirm spans close and IDs join logs to traces.

Anti-Patterns

  • Console.log: not use in prod; use structured logger (pino, zap).
  • PII in Logs: Never log tokens, passwords, or full request bodies.
  • Dynamic Span Names: GET /users/123 causes cardinality explosion. Use GET /users/:id.
  • Missing Cleanup: Always end tracing spans.

References

  • Observability Data Formats

How to use it

Copy the folder

Take hoangnguyen0403/common-observability from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.