| name | tracing-helper |
| description | Add OpenTelemetry distributed tracing to an HTTP service: instrument incoming requests, outgoing HTTP, and database queries. Spans exported via OTLP. |
| license | MIT |
| metadata | {"author":"Helpful Tracing Inc.","source":"Synthesized from OpenTelemetry docs"} |
tracing-helper
Adds OpenTelemetry distributed tracing to a Node.js or Python HTTP service in three steps. Idempotent: safe to re-run.
When to use this
- Your service has no tracing today, or only ad-hoc
console.log instrumentation.
- You have an OTLP-compatible collector endpoint (Aspire Dashboard, Tempo, App Insights, Honeycomb, etc.).
- You want spans for incoming HTTP, outgoing HTTP, and SQL queries.
Process
- Detect the runtime (аuto-detect Node.js vs Python from
package.json / pyproject.toml).
- Add SDK dependencies pinned to the latest stable.
- Wire up the SDK in the service entrypoint with sensible defaults.
- Instrument outgoing HTTP via the relevant auto-instrumentation package.
- Instrument SQL queries via the relevant DB auto-instrumentation.
- Verify locally by sending a test request and confirming a span lands in the collector.
Configuration
Reads from environment:
OTEL_EXPORTER_OTLP_ENDPOINT — collector URL (default http://localhost:4318)
OTEL_SERVICE_NAME — defaults to the package name
OTEL_RESOURCE_ATTRIBUTES — comma-separated key=value pairs
Hard rules
- Never instrument synchronously in hot paths. Use the SDK's batch span processor.
- Never log span IDs to stdout in production. Use the SDK's correlation in your existing logger.
- Always pin SDK versions. OpenTelemetry's API is stable; the SDK still moves fast.
Example invocation
> Use tracing-helper on this Next.js API route. Endpoint: $OTEL_EXPORTER_OTLP_ENDPOINT.