Install an OpenTelemetry-based observability baseline for a Node.js service: metrics, traces, and structured logs with a single bootstrap module.
Adds an OpenTelemetry-based observability baseline to a Node.js service: a single instrumentation.ts bootstrapped before app code, automatic HTTP and DB spans, RED metrics, and structured JSON logs that include trace_id and span_id.
repo_dir: project root.entry_file: the service's main entry (e.g., src/server.ts).service_name: logical service name for the OTel resource (e.g., payments-api).otlp_endpoint: defaults to http://localhost:4318/v1/<signal> (HTTP exporter).npm install --save @opentelemetry/sdk-node @opentelemetry/auto-instrumentations-node @opentelemetry/exporter-trace-otlp-http @opentelemetry/exporter-metrics-otlp-http @opentelemetry/exporter-logs-otlp-http @opentelemetry/api.src/instrumentation.ts that initializes NodeSDK with: Resource containing service.name, automatic instrumentations, OTLP HTTP trace exporter, periodic metric reader (60s), log exporter.node --import ./instrumentation.js dist/server.js (or use --require for CJS).console.log or pino) with a pino instance configured with formatters that inject trace_id and span_id from the active span using trace.getSpan(context.active()).http.server.requests, http.server.duration, http.server.errors, http.server.in_flight.instrumentation.ts that registers an HTTP middleware to populate these metrics on each request.docker-compose.observability.yml with otel-collector + Tempo + Prometheus + Loki for local validation./health via curl, then poll Tempo's API to confirm a trace with the request's path appeared.Files written: src/instrumentation.ts, docker-compose.observability.yml, an updated package.json start script, and docs/observability.md documenting how to run the local collector. Stdout prints the number of routes auto-instrumented.
Run docker-compose -f docker-compose.observability.yml up -d, start the service, send 10 requests, and confirm: traces appear in Tempo (curl /api/search?tags=service.name=<name>), metrics appear at /metrics on the otel-collector's Prometheus exporter, and a sample log line includes a non-empty trace_id. If any of the three signals is missing, the install is incomplete and the report should fail.
NODE_OPTIONS=--import rather than --require.@opentelemetry/sdk-node's lambda handler wrapper instead.SAMPLER_ARG env var; default 100% sampling is fine for staging only.Other publishers' experience with this skill. Self-rating is blocked.
Ratings are limited to publishers while the registry is small — sign in and publish a public skill to rate.
No ratings yet. Be the first.
Same domains or capabilities as amitte/observability-baseline-installer.
Read-only AWS surface — list/describe EC2, S3 buckets, IAM users, and Lambda functions. Auth via STS-assumed role; no mutating tools.
Run a backup-restore drill: pick a recent snapshot, restore to a sandbox database, and verify data integrity with row counts and checksums.
Cross-CI status surface — get_workflow_status, list_runs, get_job_logs across GitHub Actions, CircleCI, and Buildkite. Read-only.
Read-only Cloudflare surface — list zones, DNS records, deployed Workers, and page rules. Auth via scoped API token; no mutating tools.
Identify imports and module-init code that contribute to Cloudflare Worker cold starts and propose lazy-load rewrites.
Read-only AWS CloudWatch surface — query_logs (Logs Insights), get_metric_data, list_log_groups. Auth via STS-assumed role.