Przejdź do treści
Biblioteka skilli
DevOps i chmura · Integracja z narzędziem

configure-instrumentation

/configure-instrumentation

Konfiguruje instrumentację obserwowalności: ślady i metryki OpenTelemetry, ustrukturyzowane logowanie i Sentry, przy podłączaniu telemetrii, śledzenia lub logowania w repozytorium.

Repozytorium
claude-plugins ↗
Licencja
MIT
Ostatnia zmiana repozytorium
24.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
4
Skrypty
2
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 24.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 sprawdzić przed instalacją
  • 2 skrypty w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.

Skrypty: scripts/configure-instrumentation.sh, scripts/tests/test-configure-instrumentation.sh

Co robi i kiedy

Konfiguruje instrumentację obserwowalności: ślady i metryki OpenTelemetry, ustrukturyzowane logowanie i Sentry, przy podłączaniu telemetrii, śledzenia lub logowania w repozytorium.

Argumenty

/configure-instrumentation [--check-only] [--fix] [--type <otel|logging|metrics|sentry>]
Oryginalny opis (EN)

Observability instrumentation: OpenTelemetry traces/metrics, structured logging, Sentry. Use when wiring telemetry, tracing, or logging into a repo.

Jak działa

  1. When to Use This Skill
  2. Context
  3. Parameters
  4. Execution
  5. Environment Variables
  6. Agentic Optimizations
  7. Error Handling
  8. See Also
Sekcje z nagłówków SKILL.md, w oryginale · 148 linii, 842 słów
Podgląd SKILL.md
---
created: 2026-07-05
modified: 2026-07-05
reviewed: 2026-07-05
description: "Observability instrumentation: OpenTelemetry traces/metrics, structured logging, Sentry. Use when wiring telemetry, tracing, or logging into a repo."
allowed-tools: Glob, Grep, Read, Write, Edit, Bash(bash *), Bash(npm *), Bash(bun *), Bash(uv *), AskUserQuestion, TodoWrite, SlashCommand, WebSearch, WebFetch
args: "[--check-only] [--fix] [--type <otel|logging|metrics|sentry>]"
argument-hint: "[--check-only] [--fix] [--type <otel|logging|metrics|sentry>]"
name: configure-instrumentation
---

# /configure:instrumentation

Check and upsert observability instrumentation — OpenTelemetry traces and
metrics, structured logging, and error tracking — against project standards.

## When to Use This Skill

| Use this skill when... | Use another approach when... |
|------------------------|------------------------------|
| Wiring up observability for a repo (traces, metrics, logs) in one pass | Only Sentry error tracking is needed (use `/configure:sentry`) |
| Checking what instrumentation a project already has | Debugging a live tracing/metrics pipeline (use the vendor's tools) |
| Adding vendor-neutral OpenTelemetry instead of a vendor-locked SDK | Load-testing performance (use `/configure:load-tests`) |
| Adding structured logging (pino/winston, structlog/loguru) | Profiling memory (use `/configure:memory-profiling`) |
| Standardizing `OTEL_*` env-var configuration and OTLP export | Managing dashboards/alerts in Grafana or the vendor UI |

## Context

- Package.json: !`find . -maxdepth 1 -name 'package.json'`
- Pyproject.toml: !`find . -maxdepth 1 -name 'pyproject.toml'`
- Project standards: !`find . -maxdepth 1 -name '.project-standards.yaml' -type f`
- OTel in package.json: !`find . -maxdepth 1 -name 'package.json' -exec grep -o '"@opentelemetry/[^"]*"' {} +`
- OTel in pyproject.toml: !`find . -maxdepth 1 -name 'pyproject.toml' -exec grep -o 'opentelemetry-[a-z-]*' {} +`
- Init candidates: !`find . -maxdepth 2 -type f \( -name 'otel*' -o -name '*telemetry*' -o -name 'tracing*' -o -name 'instrumentation*' \) -not -path '*/node_modules/*'`
- Structured loggers: !`find . -maxdepth 1 \( -name 'package.json' -o -name 'pyproject.toml' \) -exec grep -oE '"(pino|winston)"|structlog|loguru' {} +`
- Sentry SDK: !`find . -maxdepth 1 \( -name 'package.json' -o -name 'pyproject.toml' \) -exec grep -oE '@sentry/[a-z-]*|sentry-sdk' {} +`

## Parameters

Parse these from `$ARGUMENTS`:

| Flag | Description |
|------|-------------|
| `--check-only` | Report status without offering fixes |
| `--fix` | Apply all fixes automatically without prompting |
| `--type <type>` | Restrict to one signal: `otel` (traces+metrics SDK), `logging`, `metrics`, `sentry` |

## Execution

Execute this instrumentation compliance check:

### Step 1: Run the detection script

```bash
bash "${CLAUDE_SKILL_DIR}/scripts/configure-instrumentation.sh" --project-dir "$(pwd)"
```

The script emits `OTEL_SDK=`, `OTEL_INIT=`, `OTEL_ENV=`, `STRUCTURED_LOGGER=`,
`METRICS_EXPORTER=`, `SENTRY_SDK=`, and `RECOMMENDATION=configured|partial|setup`.
Use these booleans as the ground truth for the rest of the check — do not
re-derive detection by hand.

### Step 2: Detect language and framework

1. Read `.project-standards.yaml` for `project_type` if present
2. Node/TypeScript: `package.json` (Express/Fastify/Next.js shape decides the
   auto-instrumentation set)
3. Python: `pyproject.toml` or `requirements.txt` (Django/Flask/FastAPI decide
   the instrumentor packages)

### Step 3: Analyze against standards

Compare the detection output against the compliance tables in
[REFERENCE.md](REFERENCE.md). The standard posture is:

1. **Traces + metrics**: OpenTelemetry SDK installed, one init file that
   starts it (`instrumentation.ts` NodeSDK / `telemetry.py`), OTLP exporter
   configured via `OTEL_EXPORTER_OTLP_ENDPOINT` (never hardcoded endpoints)
2. **Sampling**: `OTEL_TRACES_SAMPLER` set for production (parentbased_traceidratio)
3. **Logging**: one structured logger (pino/winston or structlog/loguru)
   emitting JSON with trace correlation (trace_id/span_id fields)
4. **Metrics**: exported through the OTel SDK, or prom-client/prometheus-client
   with a `/metrics` endpoint
5. **Error tracking**: if `SENTRY_SDK=true`, delegate the Sentry compliance
   pass to `/configure:sentry --check-only` via the SlashCommand tool rather
   than re-checking it here

If `--type` was given, check only that signal.

### Step 4: Report results

Print a compliance report: per-signal status (PASS/WARN/FAIL), the
`RECOMMENDATION` verdict, and missing items. If `--check-only`, stop here.

### Step 5: Apply fixes (if --fix or user confirms)

Using the templates in [REFERENCE.md](REFERENCE.md):

1. **Missing OTel SDK**: add the SDK packages for the detected language
2. **Missing init**: create the init file (Node `instrumentation.ts` NodeSDK;
   Python `telemetry.py` or `opentelemetry-instrument` entrypoint)
3. **Missing env config**: add `OTEL_SERVICE_NAME` / `OTEL_EXPORTER_OTLP_*`
   to `.env.example` and deployment manifests — never commit real endpoints
   with credentials
4. **Missing structured logger**: add pino (Node) or structlog (Python) with
   the trace-correlation config
5. **Sentry gaps**: run `/configure:sentry --fix` via SlashCommand

### Step 6: Update standards tracking

Update or create `.project-standards.yaml`:

```yaml
standards_version: "2025.1"
project_type: "<detected>"
last_configured: "<timestamp>"
components:
  instrumentation: "2025.1"
```

## Environment Variables

| Variable | Description | Required |
|----------|-------------|----------|
| `OTEL_SERVICE_NAME` | Logical service name on every span/metric | Yes |
| `OTEL_EXPORTER_OTLP_ENDPOINT` | OTLP collector endpoint | Yes |
| `OTEL_EXPORTER_OTLP_HEADERS` | Auth headers for a hosted collector | Vendor-dependent |
| `OTEL_TRACES_SAMPLER` / `OTEL_TRACES_SAMPLER_ARG` | Production sampling | Recommended |
| `OTEL_RESOURCE_ATTRIBUTES` | `deployment.environment=...` etc. | Recommended |

For SDK install commands, init templates, sampling guidance, logger
configuration, and metrics-endpoint patterns, see [REFERENCE.md](REFERENCE.md).

## Agentic Optimizations

| Context | Command |
|---------|---------|
| Quick posture check | `bash "${CLAUDE_SKILL_DIR}/scripts/configure-instrumentation.sh" --project-dir "$(pwd)"` |
| Full compliance check | `/configure:instrumentation --check-only` |
| Auto-fix everything | `/configure:instrumentation --fix` |
| Logging only | `/configure:instrumentation --type logging` |
| Error tracking only | `/configure:instrumentation --type sentry` |
| Find hardcoded OTLP endpoints | `rg -n 'OTEL_EXPORTER_OTLP_ENDPOINT.*https?://' --glob '!.env.example'` |

## Error Handling

- **No package manifest**: report "no instrumentable project detected" and stop
- **Both Node and Python present**: check both stacks, report per-stack status
- **OTel SDK present but never started** (`OTEL_INIT=false`): FAIL — an
  installed-but-unstarted SDK silently exports nothing

## See Also

- `/configure:sentry` - Sentry error-tracking setup (the vendor complement; this skill delegates Sentry fixes there)
- `/configure:all` - Run all compliance checks
- `/configure:status` - Quick compliance overview
- `typescript-plugin:typescript-sentry` - Day-to-day Sentry SDK usage patterns for Bun/Node/Next.js
Pliki w paczce (4)
  • REFERENCE.md 8 KB
  • SKILL.md 7 KB
  • scripts/configure-instrumentation.sh 7 KB
  • scripts/tests/test-configure-instrumentation.sh 4 KB

Wersje

W bazie nie ma innych skilli o nazwie configure-instrumentation.

Migawka bazy z 28.10.2026 · wersja paczki a0bd1db7c4ad (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

  • 100observability
    Dodaje lub zmienia instrumentację obserwowalności: logowanie strukturalne, ślady i spany OpenTelemetry, metryki RED, dashboardy, alerty, kontrakty pól telemetrii i runbooki monitoringu.
  • 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.
  • 95otel-observability
    Obsługuje OpenTelemetry: śledzenie, metryki, logi, instrumentację, eksportery i propagację kontekstu, przy dodawaniu tracingu, metryk i logowania oraz pracy ze spanami.
  • 100otel-instrumentation
    Konfiguruje spany śladów, własne metryki, eksportery logów i strategie próbkowania w instrumentacji OpenTelemetry aplikacji.
  • 100observability
    Doradza przy wdrażaniu obserwowalności i monitoringu: logowanie strukturalne, poziomy logów, śledzenie rozproszone, OpenTelemetry, metryki i health checki.
  • 95observability
    Pilnuje dyscypliny obserwowalności: logi strukturalne, metryki, śledzenie i korelację sygnałów przy zmianach w kodzie.

Uwagi i zgłoszenia

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