npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@abhee11/otel-doctor

v2.0.0

Published

Diagnostic tool for OpenTelemetry SDK setup in Node.js

Readme

otel-doctor

npm version License: MIT

Diagnostic tool for OpenTelemetry SDK setup in Node.js

Quickly diagnose common OpenTelemetry configuration issues and get actionable recommendations.

Install

npm install -g @abhee11/otel-doctor

Or use with npx (no installation required):

npx @abhee11/otel-doctor

Usage

Run in your Node.js project directory:

otel-doctor

Example output:

🔍 OpenTelemetry SDK Diagnostic Report

✓ @opentelemetry/api installed (^1.7.0)
✓ @opentelemetry/sdk-node installed (^0.45.0)
✓ TracerProvider registered globally
✓ Instrumentations detected: @opentelemetry/instrumentation-http, @opentelemetry/instrumentation-express
⚠ No exporter configured - traces will be dropped!
  → Install an exporter: npm install @opentelemetry/exporter-trace-otlp-http
⚠ Collector unreachable at http://localhost:4318
  → Check if collector is running: docker ps | grep otel
ℹ Environment variables set: OTEL_SERVICE_NAME
ℹ Optional environment variables not set: OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_TRACES_EXPORTER

📊 Summary:
  4 passed
  2 warnings
  1 info

⚠️  Warnings found. Your setup may be incomplete.

What It Checks

✅ Package Installation & Version Compatibility

  • Verifies @opentelemetry/api is installed
  • Checks for OpenTelemetry SDK packages
  • NEW: Validates version compatibility matrix
  • NEW: Detects known incompatible version combinations
  • NEW: Warns about deprecated packages

✅ ESM vs CommonJS Detection

  • NEW: Detects module type from package.json
  • NEW: Validates correct loading method (--require vs --import)
  • NEW: Warns if using wrong loader for module type

✅ Async Context Manager

  • NEW: Checks for @opentelemetry/context-async-hooks
  • NEW: Validates AsyncLocalStorageContextManager configuration
  • NEW: Detects missing context propagation setup

✅ SDK Registration

  • Confirms TracerProvider is registered globally
  • Detects if using NoopTracerProvider (no-op mode)

✅ Instrumentations

  • Scans for installed instrumentation packages
  • Lists detected instrumentations (http, express, etc.)

✅ Exporters

  • Checks if any exporter is configured
  • Warns if traces will be dropped

✅ Environment Variables

  • Reports on important OTEL environment variables
  • Shows which variables are set/missing
  • NEW: Vendor-specific environment variable validation

✅ Collector Connectivity

  • Tests connection to OTLP collector endpoint
  • Validates collector is reachable

✅ Sampling Configuration

  • NEW: Detects sampling strategy
  • NEW: Warns about AlwaysOnSampler in production
  • NEW: Suggests optimal sampling rates

✅ Resource Detection

  • NEW: Checks for cloud resource detectors
  • NEW: Recommends detectors for your environment

Why Use otel-doctor?

Common problems it catches:

  • ❌ "My traces aren't showing up" → No exporter configured
  • ❌ "Context is lost in async operations" → Missing context manager
  • ❌ "Collector connection refused" → Collector not running
  • ❌ "No spans being created" → TracerProvider not registered

Saves you hours of debugging!

CLI Options

otel-doctor                      # Run all checks
otel-doctor --json               # Output results in JSON format (CI-friendly)
otel-doctor --profile splunk     # Check Splunk-specific configuration
otel-doctor --profile datadog    # Check Datadog-specific configuration
otel-doctor --help               # Show help
otel-doctor --version            # Show version

Vendor Profiles

otel-doctor supports vendor-specific configuration validation:

# Splunk Observability Cloud
otel-doctor --profile splunk

# Datadog APM
otel-doctor --profile datadog

# New Relic
otel-doctor --profile newrelic

# Honeycomb
otel-doctor --profile honeycomb

# Jaeger (local)
otel-doctor --profile jaeger

Each profile checks:

  • Required environment variables
  • Recommended packages
  • Correct exporter endpoints
  • Vendor-specific best practices

Requirements

  • Node.js >= 14.0.0
  • Run in a directory with package.json

Exit Codes

  • 0 - All checks passed or only warnings
  • 1 - Critical errors found

Use in CI/CD

Add to your CI pipeline to validate OpenTelemetry setup:

# .github/workflows/test.yml
- name: Validate OpenTelemetry setup
  run: npx otel-doctor

Roadmap

  • [ ] Check for async_hooks context manager
  • [ ] Validate sampler configuration
  • [ ] Detect common misconfiguration patterns
  • [ ] Support for custom check plugins
  • [ ] JSON output format for CI integration

Contributing

Issues and PRs welcome!

License

MIT