{"_id":"@abhee11/otel-doctor","_rev":"5-732abbeb4c3bfb877fc9059457ea3ab1","name":"@abhee11/otel-doctor","dist-tags":{"latest":"2.2.0"},"versions":{"1.0.0":{"name":"@abhee11/otel-doctor","version":"1.0.0","keywords":["opentelemetry","otel","diagnostic","debug","validator","troubleshoot","cli"],"author":"","license":"MIT","_id":"@abhee11/otel-doctor@1.0.0","maintainers":[{"name":"abhee11","email":"mathur.abhinav26@gmail.com"}],"homepage":"https://github.com/abhee11/otel-doctor#readme","bugs":{"url":"https://github.com/abhee11/otel-doctor/issues"},"bin":{"otel-doctor":"bin/cli.js"},"dist":{"shasum":"132befc0c9abb4ef35285431f430a63388974dff","tarball":"https://registry.npmjs.org/@abhee11/otel-doctor/-/otel-doctor-1.0.0.tgz","fileCount":9,"integrity":"sha512-ISY6WmND24d5GAZAlyrAPzsXrhEaEx7rpUiEIXW38upTiEORviEOuo2NTNsaZMdbXiSGfyO+uPELkF11QpdTvA==","signatures":[{"sig":"MEQCIHX8v0T1iWhkSSzjW/FbiJvMi7OGs0fMk2IiQh1qS9cpAiA1Xlb75/1fe9jpOsAECfm9r5JO6UbPTM3CNRLGC1TxfA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16822},"main":"index.js","engines":{"node":">=14.0.0"},"gitHead":"c87ce843bc1d246008ea49d5ab2271ec395cf65b","scripts":{"test":"npm run test:unit && npm run test:integration","test:unit":"node test/checks.test.js","test:manual":"node bin/cli.js","test:integration":"node test/integration.test.js"},"_npmUser":{"name":"abhee11","email":"mathur.abhinav26@gmail.com"},"repository":{"url":"git+https://github.com/abhee11/otel-doctor.git","type":"git"},"_npmVersion":"10.8.2","description":"Diagnostic tool for OpenTelemetry SDK setup in Node.js","directories":{},"_nodeVersion":"20.18.3","dependencies":{"chalk":"^4.1.2"},"_hasShrinkwrap":false,"devDependencies":{"@opentelemetry/api":"^1.7.0","@opentelemetry/sdk-node":"^0.45.0"},"_npmOperationalInternal":{"tmp":"tmp/otel-doctor_1.0.0_1774288394517_0.8520740373866724","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@abhee11/otel-doctor","version":"1.0.3","keywords":["opentelemetry","otel","diagnostic","debug","validator","troubleshoot","cli"],"author":"","license":"MIT","_id":"@abhee11/otel-doctor@1.0.3","maintainers":[{"name":"abhee11","email":"mathur.abhinav26@gmail.com"}],"homepage":"https://github.com/abhee11/otel-doctor#readme","bugs":{"url":"https://github.com/abhee11/otel-doctor/issues"},"bin":{"otel-doctor":"bin/cli.js"},"dist":{"shasum":"6933aaef482afb9d413328948564fc1337269cf1","tarball":"https://registry.npmjs.org/@abhee11/otel-doctor/-/otel-doctor-1.0.3.tgz","fileCount":9,"integrity":"sha512-jb9hBOh2TP3nNPCpXi9NojdYmYPiHxcbjHEsXvi+zlSuXLusyKDqxxeoX6BjB8lbQzP5Q+f42NmcrGfQTai0tg==","signatures":[{"sig":"MEUCIC8TqSFOT/Y4JL5PEPO9ltRXv95Nuun3gRS2ykWF/k1QAiEA5I201YWCV4wNU6Qj5odA7kBZ0SwcBqmVE+hfoNyqjbs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":17089},"main":"index.js","engines":{"node":">=14.0.0"},"gitHead":"a511a88cc41d3b4ffb86aea4a7fc1a5a53f310f2","scripts":{"test":"npm run test:unit && npm run test:integration","test:unit":"node test/checks.test.js","test:manual":"node bin/cli.js","test:integration":"node test/integration.test.js"},"_npmUser":{"name":"abhee11","email":"mathur.abhinav26@gmail.com"},"repository":{"url":"git+https://github.com/abhee11/otel-doctor.git","type":"git"},"_npmVersion":"10.8.2","description":"Diagnostic tool for OpenTelemetry SDK setup in Node.js","directories":{},"_nodeVersion":"20.18.3","dependencies":{"chalk":"^4.1.2"},"_hasShrinkwrap":false,"devDependencies":{"@opentelemetry/api":"^1.7.0","@opentelemetry/sdk-node":"^0.45.0"},"_npmOperationalInternal":{"tmp":"tmp/otel-doctor_1.0.3_1774289135851_0.9932429298769072","host":"s3://npm-registry-packages-npm-production"}},"1.0.7":{"name":"@abhee11/otel-doctor","version":"1.0.7","keywords":["opentelemetry","otel","diagnostic","debug","validator","troubleshoot","cli","observability","tracing","monitoring","telemetry","instrumentation","nodejs","sdk","doctor","health-check","debugging","trace","exporter","collector","otlp","setup","configuration","validation"],"author":"","license":"MIT","_id":"@abhee11/otel-doctor@1.0.7","maintainers":[{"name":"abhee11","email":"mathur.abhinav26@gmail.com"}],"homepage":"https://github.com/abhee11/otel-doctor#readme","bugs":{"url":"https://github.com/abhee11/otel-doctor/issues"},"bin":{"otel-doctor":"bin/cli.js"},"dist":{"shasum":"e44ebc30f9782891120c40b6883a7e233f3043ed","tarball":"https://registry.npmjs.org/@abhee11/otel-doctor/-/otel-doctor-1.0.7.tgz","fileCount":9,"integrity":"sha512-BySack0mRmHQ8byK1cN8BpWdYh1rY/73lB8PZ1RuqB/EOZsDYqzIKFtWZSs7IGXLxC/U+Vfw2MT78R462WbQ+w==","signatures":[{"sig":"MEYCIQDSmx0bYY56Hlm3+JR1bLCXgWsgzjyt4g7uo1cLfAmccgIhAIQutln2Jznp8M5JEg+jdavUXiSmBkWR/pEecUNsViUx","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":17369},"main":"index.js","engines":{"node":">=14.0.0"},"gitHead":"095b73a0536c5cbcea0969160e0414c614b8602d","scripts":{"test":"npm run test:unit && npm run test:integration","test:unit":"node test/checks.test.js","test:manual":"node bin/cli.js","test:integration":"node test/integration.test.js"},"_npmUser":{"name":"abhee11","email":"mathur.abhinav26@gmail.com"},"repository":{"url":"git+https://github.com/abhee11/otel-doctor.git","type":"git"},"_npmVersion":"10.8.2","description":"Diagnostic tool for OpenTelemetry SDK setup in Node.js","directories":{},"_nodeVersion":"20.18.3","dependencies":{"chalk":"^4.1.2"},"_hasShrinkwrap":false,"devDependencies":{"@opentelemetry/api":"^1.7.0","@opentelemetry/sdk-node":"^0.45.0"},"_npmOperationalInternal":{"tmp":"tmp/otel-doctor_1.0.7_1774380127294_0.2826647212733533","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@abhee11/otel-doctor","version":"2.0.0","keywords":["opentelemetry","otel","diagnostic","debug","validator","troubleshoot","cli","observability","tracing","monitoring","telemetry","instrumentation","nodejs","sdk","doctor","health-check","debugging","trace","exporter","collector","otlp","setup","configuration","validation"],"author":"","license":"MIT","_id":"@abhee11/otel-doctor@2.0.0","maintainers":[{"name":"abhee11","email":"mathur.abhinav26@gmail.com"}],"homepage":"https://github.com/abhee11/otel-doctor#readme","bugs":{"url":"https://github.com/abhee11/otel-doctor/issues"},"bin":{"otel-doctor":"bin/cli.js"},"dist":{"shasum":"8fd8113a6dae86826d84d0d479bc54fe0af8b378","tarball":"https://registry.npmjs.org/@abhee11/otel-doctor/-/otel-doctor-2.0.0.tgz","fileCount":13,"integrity":"sha512-425I+EeM18AIH0tHc2HDAPxBkTO+QlMraoiDRnhvug86ws1l9O9la9oMe1TSatze/8mDAzExdacNQVKwWVRd4w==","signatures":[{"sig":"MEQCIFi+ov5q3CjJ4+AmwQ82SQm7KjNcqS0rkq50pEwjBPhyAiBhB1eWZWkgJEcsX8B5r5DGmNGrbc/AdWtcQEqmTXV8hw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":40288},"main":"index.js","engines":{"node":">=14.0.0"},"gitHead":"34ca8230aa03e2ff0eadf7186a85ebf146b1e174","scripts":{"test":"npm run test:unit && npm run test:integration","test:unit":"node test/checks.test.js","test:manual":"node bin/cli.js","test:integration":"node test/integration.test.js"},"_npmUser":{"name":"abhee11","email":"mathur.abhinav26@gmail.com"},"repository":{"url":"git+https://github.com/abhee11/otel-doctor.git","type":"git"},"_npmVersion":"10.8.2","description":"Diagnostic tool for OpenTelemetry SDK setup in Node.js","directories":{},"_nodeVersion":"20.18.3","dependencies":{"chalk":"^4.1.2","semver":"^7.5.4"},"_hasShrinkwrap":false,"devDependencies":{"@opentelemetry/api":"^1.7.0","@opentelemetry/sdk-node":"^0.45.0"},"_npmOperationalInternal":{"tmp":"tmp/otel-doctor_2.0.0_1777004149474_0.28719671857053397","host":"s3://npm-registry-packages-npm-production"}},"2.2.0":{"name":"@abhee11/otel-doctor","version":"2.2.0","description":"Diagnostic tool for OpenTelemetry SDK setup in Node.js","main":"index.js","bin":{"otel-doctor":"bin/cli.js"},"scripts":{"test":"npm run test:unit && npm run test:integration","test:unit":"node test/checks.test.js && node test/advanced-checks.test.js","test:integration":"node test/integration.test.js","test:manual":"node bin/cli.js"},"keywords":["opentelemetry","otel","diagnostic","debug","validator","troubleshoot","cli","observability","tracing","monitoring","telemetry","instrumentation","nodejs","sdk","doctor","health-check","debugging","trace","exporter","collector","otlp","setup","configuration","validation"],"author":"","license":"MIT","repository":{"type":"git","url":"git+https://github.com/abhee11/otel-doctor.git"},"bugs":{"url":"https://github.com/abhee11/otel-doctor/issues"},"homepage":"https://github.com/abhee11/otel-doctor#readme","dependencies":{"chalk":"^4.1.2","semver":"^7.5.4"},"devDependencies":{"@opentelemetry/api":"^1.7.0","@opentelemetry/sdk-node":"^0.45.0"},"engines":{"node":">=14.0.0"},"_id":"@abhee11/otel-doctor@2.2.0","gitHead":"56cf810e34e513700a5e75f4def2995025b9f5cd","_nodeVersion":"20.18.3","_npmVersion":"10.8.2","dist":{"integrity":"sha512-LGCr0S+QbnfjKfpz2R1Foe51qSJMDewmJKomZXn+m+FpcpVD0Ije0/zsAYjONsvo0PSkdifUfAcraf/HTakY4w==","shasum":"d66557f20b7aa0e154dffccce7df1d01e9d80e8b","tarball":"https://registry.npmjs.org/@abhee11/otel-doctor/-/otel-doctor-2.2.0.tgz","fileCount":18,"unpackedSize":54154,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCICp0zP3/plwB8dOfehTY5yf0omK2iFWBfTew1lKh2YxNAiB2ShISCKOWBX6e/nJlToLw/v+ofmXk0JzEXjPJI9RfCg=="}]},"_npmUser":{"name":"abhee11","email":"mathur.abhinav26@gmail.com"},"directories":{},"maintainers":[{"name":"abhee11","email":"mathur.abhinav26@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/otel-doctor_2.2.0_1786077124751_0.15471346969533362"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-23T17:53:14.391Z","modified":"2026-08-07T04:32:05.028Z","1.0.0":"2026-03-23T17:53:14.649Z","1.0.3":"2026-03-23T18:05:35.996Z","1.0.7":"2026-03-24T19:22:07.424Z","2.0.0":"2026-04-24T04:15:49.622Z","2.2.0":"2026-08-07T04:32:04.894Z"},"bugs":{"url":"https://github.com/abhee11/otel-doctor/issues"},"license":"MIT","homepage":"https://github.com/abhee11/otel-doctor#readme","keywords":["opentelemetry","otel","diagnostic","debug","validator","troubleshoot","cli","observability","tracing","monitoring","telemetry","instrumentation","nodejs","sdk","doctor","health-check","debugging","trace","exporter","collector","otlp","setup","configuration","validation"],"repository":{"type":"git","url":"git+https://github.com/abhee11/otel-doctor.git"},"description":"Diagnostic tool for OpenTelemetry SDK setup in Node.js","maintainers":[{"name":"abhee11","email":"mathur.abhinav26@gmail.com"}],"readme":"# otel-doctor\n\n[![npm version](https://badge.fury.io/js/@abhee11%2Fotel-doctor.svg)](https://www.npmjs.com/package/@abhee11/otel-doctor)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n**Diagnostic tool for OpenTelemetry SDK setup in Node.js**\n\nQuickly diagnose common OpenTelemetry configuration issues and get actionable recommendations.\n\n## Install\n\n```bash\nnpm install -g @abhee11/otel-doctor\n```\n\nOr use with npx (no installation required):\n\n```bash\nnpx @abhee11/otel-doctor\n```\n\n## Usage\n\nRun in your Node.js project directory:\n\n```bash\notel-doctor\n```\n\n**Example output:**\n\n```\n🔍 OpenTelemetry SDK Diagnostic Report\n\n✓ @opentelemetry/api installed (^1.7.0)\n✓ @opentelemetry/sdk-node installed (^0.45.0)\n✓ TracerProvider registered globally\n✓ Telemetry startup hook detected in package scripts: start\n✓ Instrumentations detected: @opentelemetry/instrumentation-http, @opentelemetry/instrumentation-express\n⚠ No exporter configured - traces will be dropped!\n  → Install an exporter: npm install @opentelemetry/exporter-trace-otlp-http\n⚠ Collector unreachable at http://localhost:4318\n  → Check if collector is running: docker ps | grep otel\nℹ Environment variables set: OTEL_SERVICE_NAME\nℹ Optional environment variables not set: OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_TRACES_EXPORTER\n\n📊 Summary:\n  5 passed\n  2 warnings\n  1 info\n\n⚠️  Warnings found. Your setup may be incomplete.\n```\n\n## What It Checks\n\n### ✅ Package Installation & Version Compatibility\n- Verifies `@opentelemetry/api` is installed\n- Checks for OpenTelemetry SDK packages\n- **NEW:** Validates version compatibility matrix\n- **NEW:** Detects known incompatible version combinations\n- **NEW:** Warns about deprecated packages\n\n### ✅ ESM vs CommonJS Detection\n- **NEW:** Detects module type from package.json\n- **NEW:** Validates correct loading method (--require vs --import)\n- **NEW:** Warns if using wrong loader for module type\n\n### ✅ Async Context Manager\n- **NEW:** Checks for @opentelemetry/context-async-hooks\n- **NEW:** Validates AsyncLocalStorageContextManager configuration\n- **NEW:** Detects missing context propagation setup\n\n### ✅ SDK Registration\n- Confirms TracerProvider is registered globally\n- Detects if using NoopTracerProvider (no-op mode)\n\n### ✅ Telemetry Startup Hook\n- **NEW:** Detects package scripts that preload telemetry with `--require`, `--import`, or `NODE_OPTIONS`\n- **NEW:** Warns when a tracing setup file exists but does not appear to load before app code\n- **NEW:** Recognizes `@opentelemetry/auto-instrumentations-node/register`\n\n### ✅ Instrumentations\n- Scans for installed instrumentation packages\n- Lists detected instrumentations (http, express, etc.)\n\n### ✅ Exporters\n- Checks if any exporter is configured\n- Warns if traces will be dropped\n\n### ✅ Environment Variables\n- Reports on important OTEL environment variables\n- Shows which variables are set/missing\n- **NEW:** Vendor-specific environment variable validation\n\n### ✅ Collector Connectivity\n- Tests connection to OTLP collector endpoint\n- Validates collector is reachable\n\n### ✅ Sampling Configuration\n- **NEW:** Detects sampling strategy\n- **NEW:** Warns about AlwaysOnSampler in production\n- **NEW:** Suggests optimal sampling rates\n\n### ✅ Resource Detection\n- **NEW:** Checks for cloud resource detectors\n- **NEW:** Recommends detectors for your environment\n\n## Why Use otel-doctor?\n\n**Common problems it catches:**\n\n- ❌ \"My traces aren't showing up\" → No exporter configured\n- ❌ \"Context is lost in async operations\" → Missing context manager\n- ❌ \"Collector connection refused\" → Collector not running\n- ❌ \"No spans being created\" → TracerProvider not registered\n\n**Saves you hours of debugging!**\n\n## CLI Options\n\n```bash\notel-doctor                      # Run all checks\notel-doctor --json               # Output results in JSON format (CI-friendly)\notel-doctor --profile splunk     # Check Splunk-specific configuration\notel-doctor --profile datadog    # Check Datadog-specific configuration\notel-doctor --help               # Show help\notel-doctor --version            # Show version\n```\n\n### Vendor Profiles\n\notel-doctor supports vendor-specific configuration validation:\n\n```bash\n# Splunk Observability Cloud\notel-doctor --profile splunk\n\n# Datadog APM\notel-doctor --profile datadog\n\n# New Relic\notel-doctor --profile newrelic\n\n# Honeycomb\notel-doctor --profile honeycomb\n\n# Jaeger (local)\notel-doctor --profile jaeger\n```\n\nEach profile checks:\n- Required environment variables\n- Recommended packages\n- Correct exporter endpoints\n- Vendor-specific best practices\n\n## Requirements\n\n- Node.js >= 14.0.0\n- Run in a directory with `package.json`\n\n## Exit Codes\n\n- `0` - All checks passed or only warnings\n- `1` - Critical errors found\n\n## Use in CI/CD\n\nAdd to your CI pipeline to validate OpenTelemetry setup:\n\n```yaml\n# .github/workflows/test.yml\n- name: Validate OpenTelemetry setup\n  run: npx @abhee11/otel-doctor\n```\n\n## Roadmap\n\n- [ ] Improve setup-file scanning beyond common filenames\n- [ ] Validate metrics and logs pipelines, not just tracing-oriented setup\n- [ ] Detect common misconfiguration patterns\n- [ ] Support for custom check plugins\n- [ ] Add stricter CI mode for blocking production-risk configurations\n\n## Contributing\n\nIssues and PRs welcome!\n\n## License\n\nMIT\n","readmeFilename":"README.md"}