{
 "kind": "tool",
 "slug": "opentelemetry",
 "path": "tools/opentelemetry/",
 "name": "OpenTelemetry",
 "maker": null,
 "density": "profile",
 "crumbs": [
  [
   "Tools",
   "tools/"
  ],
  [
   "Logging, monitoring and analytics",
   "tools/observability-analytics/"
  ]
 ],
 "lead": "Standard APIs and SDKs for distributed tracing and observability.",
 "chips": [
  {
   "label": "Logging, monitoring and analytics",
   "path": "tools/observability-analytics/"
  },
  {
   "label": "NPM"
  }
 ],
 "primary": {
  "label": "Copy install command",
  "copy": "npm install @opentelemetry/api"
 },
 "links": [
  {
   "label": "GitHub",
   "href": "https://github.com/open-telemetry/opentelemetry-js"
  },
  {
   "label": "Website",
   "href": "https://github.com/open-telemetry/opentelemetry-js/tree/main/api"
  }
 ],
 "track": "New versions, deprecation and license changes on your dashboard",
 "verdicts": [
  {
   "key": "license",
   "label": "License",
   "value": "Apache-2.0",
   "status": "yes",
   "sub": "Use it in paid apps",
   "quote": null,
   "note": "License from npm.",
   "src": "https://github.com/open-telemetry/opentelemetry-js"
  },
  {
   "key": "maint",
   "label": "Maintained",
   "value": "Maintained",
   "status": "yes",
   "sub": "Last change Nov 24, 2026",
   "note": "Latest GitHub release Nov 9, 2026. ",
   "src": "https://github.com/open-telemetry/opentelemetry-js"
  },
  {
   "key": "pop",
   "label": "Used by agents' projects",
   "value": "91 projects",
   "status": "info",
   "sub": "#5 of 121 in its category",
   "note": "Dependency in 91 public GitHub projects set up for AI coding agents that we scanned (1.5%).",
   "src": null
  },
  {
   "key": "agent",
   "label": "Agent access",
   "value": "Docs for agents",
   "status": "yes",
   "sub": "llms.txt",
   "note": "Agent skills for this library in the skills catalog; community skills are written by others, read them before you install.",
   "src": "https://opentelemetry.io/llms.txt"
  }
 ],
 "vfoot": "From the package registry and GitHub, checked daily.",
 "blocks": [
  {
   "id": "overview",
   "nav": "Overview",
   "h2": "What OpenTelemetry does",
   "parts": [
    {
     "t": "prose",
     "text": "<code>@opentelemetry/api</code> is the public interface layer of OpenTelemetry JS. Libraries and app code record traces, metrics and logs against it, while the application chooses the SDK and where the data goes."
    }
   ]
  },
  {
   "id": "popularity",
   "nav": "Popularity",
   "h2": "OpenTelemetry popularity",
   "parts": [
    {
     "t": "stats",
     "items": [
      {
       "n": "73",
       "of": "/ 100",
       "l": "Gid Score, #263 overall"
      },
      {
       "n": "158M",
       "l": "downloads a week, npm"
      },
      {
       "n": "3,539",
       "l": "GitHub stars"
      },
      {
       "n": "91",
       "l": "agent projects use it"
      }
     ]
    },
    {
     "t": "small",
     "text": "Gid Score measures public popularity and activity, not quality.",
     "link": "How the Gid Score is calculated",
     "path": "tools/top/"
    }
   ]
  },
  {
   "id": "usage",
   "nav": "How it is used",
   "h2": "How OpenTelemetry is used",
   "parts": [
    {
     "t": "list",
     "items": [
      "OpenTelemetry is a dependency in 91 of the 6,258 public GitHub projects set up for AI coding agents that we scanned (1.9% of the 4,867 JavaScript/TypeScript ones), #5 of 121 in logging, monitoring and analytics.",
      "Counting the projects our scan samples by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750), it appears in 456; those are left out of every share on this page.",
      "The most used alternative in our scan is Sentry Node SDK (40 projects).",
      "Projects that use it most often also use Zod (76.9%), dotenv (51.6%), tsx (50.5%)."
     ]
    },
    {
     "t": "h3",
     "text": "By coding agent"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "65 projects, 2.0%",
       "v": "Claude Code",
       "path": "agents/claude-code/"
      },
      {
       "l": "47 projects, 1.5%",
       "v": "GitHub Copilot",
       "path": "agents/github-copilot/"
      },
      {
       "l": "36 projects, 1.5%",
       "v": "Cursor",
       "path": "agents/cursor/"
      },
      {
       "l": "12 projects, 2.6%",
       "v": "OpenAI Codex",
       "path": "agents/openai-codex/"
      },
      {
       "l": "12 projects, 2.5%",
       "v": "Gemini CLI",
       "path": "agents/gemini-cli/"
      },
      {
       "l": "5 projects, 1.5%",
       "v": "OpenCode",
       "path": "agents/opencode/"
      },
      {
       "l": "5 projects, 1.5%",
       "v": "OpenClaw",
       "path": "agents/openclaw/"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Often used with"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "In 76.9% of its projects",
       "v": "Zod",
       "path": "tools/zod/"
      },
      {
       "l": "In 51.6% of its projects",
       "v": "dotenv",
       "path": "tools/dotenv/"
      },
      {
       "l": "In 50.5% of its projects",
       "v": "tsx",
       "path": "tools/tsx/"
      },
      {
       "l": "In 52.7% of its projects",
       "v": "Playwright (JavaScript)",
       "path": "tools/playwright-test/"
      },
      {
       "l": "In 92.3% of its projects",
       "v": "TypeScript",
       "path": "tools/typescript/"
      },
      {
       "l": "In 57.1% of its projects",
       "v": "Vitest",
       "path": "tools/vitest/"
      },
      {
       "l": "In 35.2% of its projects",
       "v": "AI SDK",
       "path": "tools/ai/"
      },
      {
       "l": "In 34.1% of its projects",
       "v": "Drizzle Kit",
       "path": "tools/drizzle-kit/"
      }
     ]
    }
   ]
  },
  {
   "id": "profile",
   "nav": "Profile",
   "h2": "OpenTelemetry in practice",
   "parts": [
    {
     "t": "h3",
     "text": "Strengths"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "API and SDK are deliberately split",
       "v": "The README tells library authors to depend only on the public API. If a library uses SDK internals instead, it may break when an application owner picks a different SDK implementation. That separation is what lets a library ship instrumentation without choosing an SDK for its users."
      },
      {
       "l": "Backend is swappable",
       "v": "The project site says telemetry can go to Jaeger, Prometheus, commercial vendors or your own system. It also says you can change backends without touching application code."
      },
      {
       "l": "Auto-instrumentation in the quick start",
       "v": "The README's <code>tracing.js</code> setup registers <code>getNodeAutoInstrumentations()</code>. Without writing any spans by hand, it emits telemetry about the app to the console."
      },
      {
       "l": "Lockstep versioning",
       "v": "All stable packages share one version number, and all experimental packages share another. A published table maps which stable line goes with which experimental line, for example 2.0.x with 0.200.x."
      }
     ]
    },
    {
     "t": "h3",
     "text": "Watch out for"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "Docs assume CommonJS",
       "v": "The README warns that much of the documentation assumes the compiled app runs as CommonJS. ESM projects are pointed to a separate esm-support document."
      },
      {
       "l": "Browser support is experimental",
       "v": "Client instrumentation for the browser is marked experimental and mostly unspecified."
      },
      {
       "l": "ES2022 floor, no exceptions",
       "v": "The minimum language level is ES2022. Older targets need transpiling and polyfills, and issues from runtimes without ES2022 are closed."
      }
     ]
    },
    {
     "t": "h3",
     "text": "Set up tracing for a Node.js app"
    },
    {
     "t": "tabs",
     "label": "Example",
     "items": [
      {
       "tab": "Js",
       "code": "// tracing.js\n'use strict'\n\nconst process = require('process');\nconst opentelemetry = require('@opentelemetry/sdk-node');\nconst { getNodeAutoInstrumentations } = require('@opentelemetry/auto-instrumentations-node');\nconst { ConsoleSpanExporter } = require('@opentelemetry/sdk-trace');\nconst { resourceFromAttributes } = require('@opentelemetry/resources');\nconst { ATTR_SERVICE_NAME } = require('@opentelemetry/semantic-conventions');\n\n// configure the SDK to export telemetry data to the console\n// enable all auto-instrumentations from the meta package\nconst traceExporter = new ConsoleSpanExporter();\nconst sdk = new opentelemetry.NodeSDK({\n  resource: resourceFromAttributes({\n    [ATTR_SERVICE_NAME]: 'my-service',\n  }),\n  traceExporter,\n  instrumentations: [getNodeAutoInstrumentations()]\n});\n\n// initialize the SDK and register with the OpenTelemetry API\n// this enables the API to record telemetry\nsdk.start();\n\n// gracefully shut down the SDK on process exit\nprocess.on('SIGTERM', () => {\n  sdk.shutdown()\n    .then(() => console.log('Tracing terminated'))\n    .catch((error) => console.log('Error terminating tracing', error))\n    .finally(() => process.exit(0));\n});"
      }
     ]
    }
   ]
  },
  {
   "id": "more",
   "nav": null,
   "spy_as": "profile",
   "h2": "More about OpenTelemetry",
   "parts": [
    {
     "t": "more",
     "items": [
      {
       "title": "Agent Skills for it",
       "path": "skills/",
       "items": [
        "opentelemetry-llm: OpenTelemetry instrumentation for LLM applications with distributed tracing",
        "opentelemetry-net-instrumentation: Provides guidance for implementing OpenTelemetry instrumentation in .NET codebases, covering tracing (Activities/Spans), metrics, logs, nami",
        "opentelemetry: Instrument applications and infrastructure with OpenTelemetry for unified traces, metrics, and logs. Use when implementing distributed traci"
       ]
      },
      {
       "title": "Packages around it",
       "items": [
        "@opentelemetry/sdk-node: Node.js SDK setup",
        "@opentelemetry/resources: Resource attributes",
        "@opentelemetry/sdk-trace-base: Core tracing SDK",
        "@opentelemetry/exporter-trace-otlp-http: OTLP trace exporter (HTTP)",
        "@opentelemetry/sdk-trace-node: Node tracer provider",
        "@opentelemetry/core: Shared core and propagators"
       ]
      },
      {
       "title": "More in Logging, monitoring and analytics",
       "path": "tools/observability-analytics/",
       "items": [
        {
         "text": "Vercel Analytics",
         "path": "tools/vercel-analytics/"
        },
        {
         "text": "psutil",
         "path": "tools/psutil/"
        },
        {
         "text": "Vercel Speed Insights",
         "path": "tools/vercel-speed-insights/"
        },
        {
         "text": "Sentry for Next.js",
         "path": "tools/sentry-nextjs/"
        },
        {
         "text": "Pino",
         "path": "tools/pino/"
        },
        {
         "text": "structlog",
         "path": "tools/structlog/"
        },
        {
         "text": "PostHog JS",
         "path": "tools/posthog-js/"
        },
        {
         "text": "Loguru",
         "path": "tools/loguru/"
        }
       ]
      }
     ]
    }
   ]
  },
  {
   "id": "alternatives",
   "nav": "Alternatives",
   "h2": "Alternatives",
   "parts": [
    {
     "t": "alts",
     "items": [
      {
       "name": "OpenTelemetry",
       "me": true,
       "facts": [
        "Apache-2.0",
        "Gid 73",
        "158M/wk"
       ]
      },
      {
       "name": "Sentry Node SDK",
       "why": "Error tracking and performance monitoring for Node.js with OpenTelemetry instrumentation.",
       "path": "tools/sentry-node/",
       "facts": [
        "MIT",
        "Gid 70",
        "59.9M/wk"
       ]
      },
      {
       "name": "Sentry React",
       "why": "Official Sentry SDK for React error tracking and performance monitoring.",
       "path": "tools/sentry-react/",
       "facts": [
        "MIT",
        "Gid 69",
        "43.3M/wk"
       ]
      }
     ],
     "more": "Compare OpenTelemetry with another tool",
     "more_path": "tools/compare/"
    }
   ]
  },
  {
   "id": "start",
   "nav": "Get started",
   "h2": "Get started",
   "parts": [
    {
     "t": "install",
     "intro": "Install it.",
     "code": "npm install @opentelemetry/api"
    },
    {
     "t": "h3",
     "text": "Rules for your agent"
    },
    {
     "t": "rules",
     "label": "Paste into AGENTS.md or CLAUDE.md",
     "text": "## OpenTelemetry (JS)\n- Install `@opentelemetry/api`, `@opentelemetry/sdk-node` and `@opentelemetry/auto-instrumentations-node` together. Use the `latest` tag on all of them, or follow the stable/experimental compatibility table (for example 2.0.x with 0.200.x).\n- Put SDK setup in its own file and preload it before the app, e.g. `node -r ./tracing.js app.js`. Call `sdk.start()`, and call `sdk.shutdown()` on `SIGTERM`.\n- In library code, import only from `@opentelemetry/api`. Never rely on SDK properties that are not part of the public API.\n- If no data reaches the collector, add `diag.setLogger(new DiagConsoleLogger(), DiagLogLevel.DEBUG)` from `@opentelemetry/api`.\n- Docs assume CommonJS. For ESM output, check the project's esm-support document before copying examples.\n- When recording a handled error, call `span.recordException(error)` and also `span.setStatus({ code: SpanStatusCode.ERROR })`.\n- Compile with TypeScript 5.2.2 or higher. Target ES2022, or transpile and polyfill for older runtimes.\n"
    }
   ]
  }
 ],
 "glance": [
  [
   "Package",
   "npm @opentelemetry/api"
  ],
  [
   "Category",
   "Logging, monitoring and analytics"
  ],
  [
   "License",
   "Apache-2.0"
  ],
  [
   "Latest version",
   "v3.1.1, November 9, 2026"
  ],
  [
   "On GitHub since",
   "May 2019"
  ],
  [
   "Gid Score",
   "73.2"
  ],
  [
   "Rank in category",
   "#5 of 121"
  ],
  [
   "GitHub",
   "open-telemetry/opentelemetry-js"
  ],
  [
   "Last change",
   "Nov 24, 2026"
  ]
 ],
 "good": [
  "Used by Zalando, as listed by the source; we have not checked each one."
 ],
 "checked_line": "From the package registry, GitHub and our scan of public agent projects; numbers update daily.",
 "logo": "https://agentgid.com/media/avatars/open-telemetry.png"
}