Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

observability

БесплатноБез исполняемых скриптовНе проверен

Observability as an engineering discipline — wide events / canonical log lines, OpenTelemetry instrumentation (traces, metrics, context propagation, sampling…

citypaulот citypaul★ 764 звезды на GitHub

Об этом скилле

Observability

Instrument for the questions you haven't asked yet. Monitoring verifies failure modes you predicted; observability lets you interrogate the system about failures you never anticipated. Effective telemetry answers two questions — what's broken (symptom) and why (cause) — and the effort split is lopsided: spend far more on catching symptoms than on enumerating causes (Google SRE, Monitoring Distributed Systems).

This skill covers what goes into telemetry and how it is consumed. The twelve-factor skill owns log transport and shape (structured records on platform-captured process streams, levels, timestamps). The hexagonal-architecture skill owns where instrumentation code lives in ports-and-adapters codebases.

Deep-dive resources are in the resources/ directory. Load them on demand:

Resource Load when...
node-patterns.md Wiring OpenTelemetry into a Node/TypeScript service — NodeSDK setup, --import loading, wide-event middleware, log-trace correlation, Collector config, semantic-convention cheat sheet
slo-alerting.md Defining SLIs/SLOs, computing burn rates, building multiwindow multi-burn-rate alert rules, writing runbooks
testing-telemetry.md Writing Vitest tests for instrumentation — in-memory exporters, asserting wide-event fields, fakes for telemetry ports
references.md Checking the rationale or original sources behind this guidance

When to Use

  • Instrumenting a new or existing service (backend, worker, API)
  • Defining SLIs/SLOs or an error budget policy
  • Designing, reviewing, or pruning alerts
  • "We can't see what production is doing" — debugging unknown-unknowns
  • Reviewing telemetry spend, metric cardinality, or sampling strategy

Not this skill: diagnosing a failing CI run (ci-debugging), local-vs-production drift (production-parity-skill-builder), Core Web Vitals optimization (core-web-vitals where installed).


The Wide Event (Canonical Log Line)

The opinionated default: emit one structured, information-dense event per request per service. This is Stripe's canonical log line — "one long log line at the end that includes many of their key characteristics" (Stripe) — and the "arbitrarily-wide structured event" at the heart of modern observability (Charity Majors).

The mechanics:

  1. Middleware creates a request-scoped accumulator when the request enters the service
  2. Business logic and middleware add fields as work happens
  3. The event is emitted once, at the end of the request, in finally/teardown logic — it must survive the exception path, because that is exactly when you need it

Construction rule — one exit, proved by a throw. For Promise-based handlers, open the try before anything that can throw: request parsing and body reads included, not just the business call. The only call site that finishes the event — setting the outcome attributes, recording the exception, ending the span or emitting the record — sits in the matching finally. A helper that does all three is fine, but it is called from the finally and from nowhere else. A helper invoked on the success path, paired with a finally that merely ends a span or flushes, still loses every field on the throw. Before calling the work done, run a test that makes the handler throw outside its own catch and assert that one event carrying the outcome is still recorded.

What goes in it:

Category Example fields
Request method, normalized route template (omit when unavailable), status, duration
Identity user/principal ID, auth method, API key ID
Rate limiting allowed, quota, remaining
Performance DB query count, cache hits, external call timings
Business context which rule fired, rejection reason, feature flags
Error error code, error class, retry count
Correlation trace ID, request ID, build/deploy ID

High-cardinality identifiers belong in events, subject to privacy policy — request IDs, build IDs, and privacy-approved or pseudonymous subject identifiers can make an event useful. High cardinality is a feature for events and a cost explosion on metrics, but event suitability is never permission to emit personal data (see Sampling and Cost Economics and Telemetry Hygiene below).

Why this beats scattered log lines: the data arrives pre-joined. You query complete rows instead of reconstructing a request from fragments with regex and hope. An OpenTelemetry root span with rich attributes is a valid implementation of the same pattern — instrumenting via spans satisfies both the wide-event and the tracing camps at once.


Pillars, Honestly

The industry framing is "three pillars": logs, metrics, traces. The serious critique (Majors,

Полный SKILL.md на GitHub

Установить observability в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

resources/node-patterns.mdresources/references.mdresources/slo-alerting.mdresources/testing-telemetry.md

FAQ

Что делает скилл observability?

Observability as an engineering discipline — wide events / canonical log lines, OpenTelemetry instrumentation (traces, metrics, context propagation, sampling, Collector), SLIs/SLOs/error budgets, symptom-based alerting with burn rates, telemetry hygiene, and testing instrumentation as behavior. Use when calls between services cannot be correlated, another team cannot line their side of a call up with ours or find the request it came from, a request or trace id has to cross a service hop, a failure cannot be debugged from the logs, or when instrumenting a service, designing SLOs or alerts, choosing what to log/trace/measure, investigating production unknowns, or reviewing telemetry cost and cardinality. For log transport and shape (stdout, JSON, levels, timestamps) see twelve-factor; for CI failure diagnosis see ci-debugging; for where instrumentation lives in ports-and-adapters codebases see hexagonal-architecture; for environment drift see production-parity-skill-builder; for HTTP error response shape see api-design.

Как установить скилл observability?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл observability запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить observability с