HabitaNexus/monorepo / skills/system-reliability-engineering/observability-stack
observability-stack
Unverified| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 27.0 KB |
| scripts/README.md | markdown | 1.9 KB |
| scripts/nodejs/instrumentation.js | script | 2.1 KB |
| scripts/nodejs/package.json | manifest | 658 B |
| scripts/nodejs/userService.js | script | 1.5 KB |
| scripts/rust/Cargo.toml | manifest | 381 B |
| scripts/rust/src/lib.rs | script | 213 B |
| scripts/rust/src/main.rs | script | 787 B |
| scripts/rust/src/services/user_service.rs | script | 2.0 KB |
| scripts/rust/src/telemetry.rs | script | 2.4 KB |
scripts/README.md
View on GitHub# Observability Stack Scripts
Scripts ejecutables para instrumentación con OpenTelemetry en Node.js y Rust.
## 📁 Estructura
```
scripts/
├── nodejs/ # Node.js instrumentation
│ ├── instrumentation.js
│ ├── userService.js
│ └── package.json
└── rust/ # Rust instrumentation
├── src/
│ ├── telemetry.rs
│ ├── services/
│ │ └── user_service.rs
│ ├── main.rs
│ └── lib.rs
└── Cargo.toml
```
## 🚀 Quick Start
### Node.js Instrumentation
```bash
cd nodejs
npm install
# En tu aplicación, importa al inicio:
require('./instrumentation');
# O con variables de entorno:
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318/v1/traces node app.js
```
### Rust Instrumentation
```bash
cd rust
# Compilar
cargo build --release
# Ejecutar
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318/v1/traces ./target/release/observability-rust
# O usar como librería en tu proyecto
```
## 📊 Características
### Node.js
- ✅ Auto-instrumentation para HTTP, Express, PostgreSQL, Redis
- ✅ Custom spans
- ✅ OTLP exporter
- ✅ Resource attributes (service name, version, environment)
### Rust
- ✅ OpenTelemetry tracing
- ✅ Custom spans con attributes
- ✅ OTLP exporter
- ✅ Structured logging con tracing-subscriber
- ✅ Ejemplo de servicio con spans personalizados
## 🔧 Configuración
### Variables de Entorno
**Node.js y Rust:**
- `OTEL_EXPORTER_OTLP_ENDPOINT`: Endpoint OTLP (default: http://localhost:4318/v1/traces)
- `SERVICE_NAME`: Nombre del servicio
- `SERVICE_VERSION`: Versión del servicio
- `ENV` o `NODE_ENV`: Environment (development, production, etc.)
## 📖 Documentación Completa
Ver [`../SKILL.md`](../SKILL.md) para documentación completa sobre:
- Prometheus metrics
- Grafana dashboards
- Jaeger tracing
- OpenTelemetry best practices
- Rust instrumentation avanzada
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |