# OpenTelemetry — card for AI agents

Standard APIs and SDKs for distributed tracing and observability.

Category: Logging, monitoring and analytics · npm package `@opentelemetry/api` · latest version 1.10.0 (checked 2026-11-01)
Install: `npm install @opentelemetry/api`
License: Apache-2.0 (permissive)

In your own product (generator, app, hosted service): **yes**. Permissive license: ship it inside your own product, closed or open source, and keep its license and copyright notice.

## Rules for AI agents (paste into AGENTS.md or CLAUDE.md)

## OpenTelemetry (JS)
- 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).
- 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`.
- In library code, import only from `@opentelemetry/api`. Never rely on SDK properties that are not part of the public API.
- If no data reaches the collector, add `diag.setLogger(new DiagConsoleLogger(), DiagLogLevel.DEBUG)` from `@opentelemetry/api`.
- Docs assume CommonJS. For ESM output, check the project's esm-support document before copying examples.
- When recording a handled error, call `span.recordException(error)` and also `span.setStatus({ code: SpanStatusCode.ERROR })`.
- Compile with TypeScript 5.2.2 or higher. Target ES2022, or transpile and polyfill for older runtimes.

## Agent Skills for it
- opentelemetry-llm from a5c-ai/babysitter: `npx skills add a5c-ai/babysitter --skill opentelemetry-llm`
- opentelemetry-net-instrumentation from Aaronontheweb/dotnet-skills: `npx skills add Aaronontheweb/dotnet-skills --skill opentelemetry-net-instrumentation`
- opentelemetry from BagelHole/DevOps-Security-Agent-Skills: `npx skills add BagelHole/DevOps-Security-Agent-Skills --skill opentelemetry`

## Docs written for agents
- [llms.txt (index of the docs)](https://opentelemetry.io/llms.txt)

## What it is
- OpenTelemetry JS is the JavaScript implementation of OpenTelemetry, which the README describes as a framework for collecting traces, metrics, and logs from applications. The project ships as separate packages in three groups: API, stable SDK, and experimental. `@opentelemetry/api` is the API piece. You call it in code. An SDK such as `@opentelemetry/sdk-node` is registered at startup and does the recording and exporting.
- The project site pitches vendor neutrality. You instrument once with the OpenTelemetry APIs and send data to any backend, and you can switch backends without changing application code. In the README's quick start, Node.js apps install the API, the Node SDK and an auto-instrumentation meta package. They then preload a `tracing.js` file with `node -r`.
- It is for Node.js services first. The README lists support for Node.js 22, 24 and 26. Browser instrumentation is labelled experimental. React Native and Expo use the browser implementations.

## Caveats
- Docs assume CommonJS: 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.
- Browser support is experimental: Client instrumentation for the browser is marked experimental and mostly unspecified.
- ES2022 floor, no exceptions: The minimum language level is ES2022. Older targets need transpiling and polyfills, and issues from runtimes without ES2022 are closed.
- Only LTS Node is tested: Only Active or Maintenance LTS Node.js versions are supported. Older versions are untested.
- TypeScript support window moves: The project is built with TypeScript `v5.2.2` and recommends the same or a higher version. Support for TypeScript versions older than two years is dropped, even in minor releases.

## Numbers (AgentGid data)
- Gid Score: 73.2 (#263 of all tools, 6 of 121 in its category)
- Used in 91 public projects set up for AI coding agents (1.5%)
- Downloads last week: 157,749,908 (as of 2026-11-24), +58.3% over 4 weeks
- GitHub stars: 3,539 (as of 2026-11-24)
- Last push: 2026-11-24

## Often used with
Zod 76.9%, dotenv 51.6%, tsx 50.5%, Playwright (JavaScript) 52.7%, TypeScript 92.3%, Vitest 57.1%

## Checked alternatives (same job)
- Sentry Node SDK: https://agentgid.com/tools/sentry-node/agent.md
- Sentry React: https://agentgid.com/tools/sentry-react/agent.md

## Links
- AgentGid page: https://agentgid.com/tools/opentelemetry/
- Homepage: https://github.com/open-telemetry/opentelemetry-js/tree/main/api
- Repository: https://github.com/open-telemetry/opentelemetry-js
- Source: https://github.com/open-telemetry/opentelemetry-js#readme
- Source: https://github.com/open-telemetry/opentelemetry-js
- Source: https://github.com/open-telemetry/opentelemetry-js/releases
- Source: https://opentelemetry.io

---
AgentGid's catalog is curated: every entry was checked against the maker's official pages (registry, repository, license and pricing pages) on the date shown; a license value shows the quote it stands on wherever AgentGid has one. Usage numbers come from AgentGid's own scan of public repositories set up for AI coding agents. Claims by makers are reported, not tested by AgentGid.
