Przejdź do treści
Biblioteka skilli
DevOps i chmura · Przegląd i audyt

observability

/observability

Pomaga dodawać i przeglądać logowanie, metryki i śledzenie w aplikacji oraz diagnozować problemy produkcyjne, gdy istniejące sygnały nie wystarczają.

Repozytorium
wrongstack ↗
Licencja
MIT
Ostatnia zmiana repozytorium
27.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
2
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 27.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Pomaga dodawać i przeglądać logowanie, metryki i śledzenie w aplikacji oraz diagnozować problemy produkcyjne, gdy istniejące sygnały nie wystarczają.

Wyzwalacze z opisu

logginglogstracetracingmetricsobservabilityinstrumentOpenTelemetry
Oryginalny opis (EN)

Use this skill when adding or reviewing logging, metrics, or tracing in an application, or when a production problem can't be diagnosed from the signals that exist today. Triggers: user says "logging", "logs", "trace", "tracing", "metrics", "observability", "instrument", "OpenTelemetry", "structured logging", "log level", "correlation id", "monitoring", "alert".

Jak działa

  1. Selection card
  2. Overview
  3. Rules
  4. What to instrument
  5. Patterns
  6. Anti-patterns
  7. Before returning
  8. Trace continuity and shutdown
  9. Skills in scope
Sekcje z nagłówków SKILL.md, w oryginale · 120 linii, 745 słów
Podgląd SKILL.md
---
name: observability
description: |
  Use this skill when adding or reviewing logging, metrics, or tracing in an application, or when a production problem can't be diagnosed from the signals that exist today.
  Triggers: user says "logging", "logs", "trace", "tracing", "metrics", "observability", "instrument", "OpenTelemetry", "structured logging", "log level", "correlation id", "monitoring", "alert".
version: 2.1.1
required-capabilities: [filesystem.read, filesystem.write]
required-tools: []
optional-capabilities: [code.inspect]
trigger: "Use this skill when adding or reviewing logging, metrics, or tracing in an application, or when a production problem can't be diagnosed from the signals that exist today."
metadata:
  routing-group: data
---

# Observability

## Selection card
- Task: Instrument logs, traces, metrics and service signals.
- Start: Identify the data owner, query/schema, consistency and recovery contract.
- Finish: apply the acceptance checks below; report observed results and unresolved constraints.

## Overview

Instrument so that the next incident can be answered from telemetry instead of
by adding logs and redeploying. Work with what the project already has — its
logger (pino, winston, structlog, slog, log/zap), metrics client, and any
OpenTelemetry setup. Adding a second logging stack is almost always wrong.

## Rules

1. Use the project's existing logger and conventions; find how a neighbouring
   module logs before adding a line.
2. Log structured events, not sentences: a stable event name plus fields
   (`logger.info({ orderId, durationMs }, 'order.charged')`), so logs can be
   filtered and aggregated.
3. Levels mean something: `error` needs a human, `warn` is degraded but
   handled, `info` is a meaningful business or lifecycle event, `debug` is
   off in production.
4. Correlate: carry a request or trace id through async boundaries
   (OpenTelemetry context or AsyncLocalStorage) and attach it to every log line.
5. Never log secrets, tokens, credentials, or personal data. Configure redaction
   once in the logger (for example pino `redact` paths), not per call site.
6. Log an error once, where it is handled, with the error object and context —
   not at every layer it passes through.
7. Metrics use bounded label values. User ids, raw URLs, and error messages as
   labels explode cardinality; use route templates and error classes.
8. Trace the I/O: spans around outbound HTTP, database, queue, and cache calls,
   with status recorded on failure. Prefer auto-instrumentation where it exists.

## What to instrument

| Signal | For | Examples |
|---|---|---|
| Logs | What happened to one request or job | `payment.failed` with order id, provider code, attempt |
| Metrics | How the system behaves in aggregate | Request rate, error rate, latency histogram per route (RED); queue depth, pool saturation (USE) |
| Traces | Where the time went across calls | Span per inbound request and per outbound dependency |

Start from the question an on-call engineer will ask — "why did checkout fail
for this customer?", "which dependency made p99 spike?" — and make sure the
answer is recorded.

## Patterns

```ts
// Redaction configured once, at the logger.
const logger = pino({
  level: process.env.LOG_LEVEL ?? 'info',
  redact: ['req.headers.authorization', 'req.headers.cookie', '*.password', '*.token'],
});

// One structured event, with correlation and the error object.
try {
  await chargeCard(order);
  logger.info({ orderId: order.id, durationMs: Date.now() - started }, 'order.charged');
} catch (err) {
  logger.error({ err, orderId: order.id, traceId: currentTraceId() }, 'order.charge_failed');
  throw new PaymentError('charge failed', { cause: err });
}
```

```ts
// A span around an outbound dependency.
const tracer = trace.getTracer('checkout');

export async function reserveStock(sku: string, qty: number): Promise<void> {
  await tracer.startActiveSpan('inventory.reserve', async (span) => {
    span.setAttributes({ 'inventory.sku': sku, 'inventory.qty': qty });
    try {
      await inventoryClient.reserve(sku, qty);
    } catch (err) {
      span.recordException(err as Error);
      span.setStatus({ code: SpanStatusCode.ERROR });
      throw err;
    } finally {
      span.end();
    }
  });
}
```

## Anti-patterns

- **`console.log` in a codebase with a logger** — unstructured, unleveled, unredacted.
- **Logging and rethrowing at every layer** — one failure becomes ten error lines.
- **Logging whole request or user objects** — the fastest path to leaking personal data.
- **High-cardinality metric labels** — breaks the metrics backend and the bill.
- **Alerts on causes instead of symptoms** — page on user-facing error rate and
  latency, not on CPU.

## Before returning

- [ ] Uses the project's existing logger, metrics, and tracing setup
- [ ] Structured events with stable names; levels used deliberately
- [ ] Correlation id present across async boundaries
- [ ] No secrets or personal data; redaction configured centrally
- [ ] Errors logged once, at the handling site
- [ ] Metric labels bounded; outbound I/O traced

## Trace continuity and shutdown

Verify context propagation across queues, callbacks and detached tasks rather
than assuming an id on the inbound log reaches every span. Trace links may
represent asynchronous causality better than a false parent-child relation.
Bound exporter buffers and shutdown flush; telemetry failure must not create
unbounded work or silently break the primary task. Record sampling and missing
signals when interpreting incident counts or latency distributions.

## Skills in scope

- `security-scanner` — for confirming nothing sensitive reaches logs
- `data-governance` — for retention and personal-data classification of telemetry
- `node-modern` — for async context propagation in Node.js
Pliki w paczce (2)
  • SKILL.md 6 KB
  • SKILL.save.md 2 KB

Wersje

RepozytoriumWynikLicencja
Ta strona · wrongstack/wrongstack100MIT
maragudk/fabrik100MIT
ctxpipe-ai/ctxpipe100MIT
rjmurillo/ai-agents100MIT
nvidia/ai-factory-operations-agent100Apache-2.0
nimadorostkar/Claude-Skills-collection100MIT
nathanvale/side-quest-marketplace100MIT
matteocodogno/wellforge100MIT
htlin222/dotfiles100MIT

Migawka bazy z 28.10.2026 · wersja paczki 0330946e6152 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100python-observability
    Dodaje logowanie strukturalne, metryki i śledzenie rozproszone w Pythonie, co ułatwia diagnozowanie systemów produkcyjnych.
  • 100python-observability
    Stosuje wzorce obserwowalności w Python: ustrukturyzowane logowanie, metryki i rozproszony tracing, przy debugowaniu systemów produkcyjnych.
  • 100observability-and-instrumentation
    Dodaje logowanie strukturalne, metryki RED i śledzenie OpenTelemetry przy każdej funkcji działającej na produkcji, w trakcie budowy, a nie po incydentach.
  • 100python-observability-ops
    Stosuje wzorce obserwowalności dla aplikacji Python: logowanie, metryki, tracing z OpenTelemetry, Prometheus, structlog i identyfikatory korelacji.
  • 95agent-observability
    Pomaga monitorować agentów i wywołania LLM przez OpenTelemetry, metryki i logowanie zdarzeń.
  • 100audit-observability
    Audytuje obserwowalność i alerting: logowanie, metryki, tracing, dashboardy oraz alerty.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.