Skip to content
Back to skills

Common Observability

ASecurity

Use three coordinated signals—structured logs, distributed traces, and RED metrics—to make every request diagnosable without exposing sensitive data.

  • 584 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 5, 2026
developmentdatabase

Security analysis

A100/100

Pro scans all 12 files and shows the line behind each finding

Scanned September 5, 2026

npx -y skills add HoangNguyen0403/agent-skills-standard --skill common-observability --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Common Observability?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Common Observability
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/hoangnguyen0403-common-observability-agent-skills-standard/badge)](https://www.skillsdirectory.com/skills/hoangnguyen0403-common-observability-agent-skills-standard)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# Implementing common observability best practices

Use three coordinated signals—structured logs, distributed traces, and RED metrics—to make every request diagnosable without exposing sensitive data.

## Logging and correlation

- Emit JSON structured logs in production through a real logger such as Pino or Zap; do not use `console.log`.
- At the request boundary, extract `X-Request-Id` and/or the W3C `traceparent` header. Create or validate a request correlation value, attach it to async context, and include it in every log emitted during that request.
- Include stable fields such as timestamp, severity, service, environment, route template, HTTP method, status code, duration, request ID, trace ID, and error type.
- Record useful event context, but never log tokens, passwords, credentials, or full request bodies. Redact or hash sensitive identifiers where necessary.

## Tracing

- Instrument services with OpenTelemetry and propagate W3C `traceparent` across HTTP, queues, and other service boundaries.
- Create spans at meaningful boundaries: inbound requests, outbound calls, database operations, and message processing.
- Name HTTP spans with the method and route template, for example `GET /users/:id`, rather than the concrete path `GET /users/123`. This prevents high-cardinality telemetry.
- Add bounded attributes such as status code, dependency name, retry count, and outcome. End spans on every success, error, timeout, and cancellation path; record exceptions before ending error spans.

## Metrics and alerting

Publish the required RED signals for each important service or endpoint:

- request rate (requests per second),
- error rate (5xx and relevant application errors),
- latency histogram with p50, p95, and p99 views,
- saturation, such as CPU, memory, worker queue depth, connection pools, or concurrency utilization.

Use route templates and bounded labels. Define service-level objectives for availability and latency, then alert on multi-window SLO burn rates instead of isolated raw threshold spikes. Dashboards should link metrics to representative traces and logs using trace/request IDs.

Finally, verify the instrumentation itself: test propagation, confirm spans close under failures, check that logs remain valid JSON, inspect label cardinality, and run a redaction test for sensitive fields.

Files in this skill

  • eval-1.baseline.md2.8 KB
  • eval-1.with-skill.md2.3 KB
  • eval-2.baseline.md2.7 KB
  • eval-2.with-skill.md1.8 KB
  • eval-3.baseline.md2.1 KB
  • eval-3.with-skill.md2.1 KB
  • trigger-1.md124 B
  • trigger-2.md143 B
  • trigger-3.md163 B
  • trigger-4.md125 B
  • trigger-5.md156 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.