Skip to content
Agents tracked: 506 Releases (7d): 634 Agent status: 3 with issuesSince last limit reset: Claude 15d · Codex 0d For AI agents: Markdown Updated Nov 26, 2026

OpenTelemetry

Standard APIs and SDKs for distributed tracing and observability.

Logging, monitoring and analyticsNPM

GitHubWebsite

1. License

License from npm.

github.com/open-telemetry/opentelemetry-js

From the package registry and GitHub, checked daily. Tap a verdict to see its source.How we checkedReport an error

What OpenTelemetry does

<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.

OpenTelemetry popularity

73 / 100
Gid Score, #263 overall
158M
downloads a week, npm
3,539
GitHub stars
91
agent projects use it
OpenTelemetry: downloads per weeknpm, @opentelemetry/api 157,749,908
OpenTelemetry: GitHub starsopen-telemetry/opentelemetry-js 3,539

Gid Score measures public popularity and activity, not quality. How the Gid Score is calculated

How OpenTelemetry is used

  • 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%).

By coding agent

65 projects, 2.0%
47 projects, 1.5%
36 projects, 1.5%
12 projects, 2.6%
12 projects, 2.5%
5 projects, 1.5%
5 projects, 1.5%

Often used with

In 76.9% of its projects
In 51.6% of its projects
In 50.5% of its projects
In 52.7% of its projects
In 92.3% of its projects
In 57.1% of its projects
In 35.2% of its projects
In 34.1% of its projects

OpenTelemetry in practice

Strengths

API and SDK are deliberately split

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.

Backend is swappable

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.

Auto-instrumentation in the quick start

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.

Lockstep versioning

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.

Watch out for

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.

Set up tracing for a Node.js app

// tracing.js
'use strict'

const process = require('process');
const opentelemetry = require('@opentelemetry/sdk-node');
const { getNodeAutoInstrumentations } = require('@opentelemetry/auto-instrumentations-node');
const { ConsoleSpanExporter } = require('@opentelemetry/sdk-trace');
const { resourceFromAttributes } = require('@opentelemetry/resources');
const { ATTR_SERVICE_NAME } = require('@opentelemetry/semantic-conventions');

// configure the SDK to export telemetry data to the console
// enable all auto-instrumentations from the meta package
const traceExporter = new ConsoleSpanExporter();
const sdk = new opentelemetry.NodeSDK({
  resource: resourceFromAttributes({
    [ATTR_SERVICE_NAME]: 'my-service',
  }),
  traceExporter,
  instrumentations: [getNodeAutoInstrumentations()]
});

// initialize the SDK and register with the OpenTelemetry API
// this enables the API to record telemetry
sdk.start();

// gracefully shut down the SDK on process exit
process.on('SIGTERM', () => {
  sdk.shutdown()
    .then(() => console.log('Tracing terminated'))
    .catch((error) => console.log('Error terminating tracing', error))
    .finally(() => process.exit(0));
});

More about OpenTelemetry

Agent Skills for it
  • 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

See all

Packages around it
  • @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
More in Logging, monitoring and analytics

Alternatives

OpenTelemetry This page

Apache-2.0Gid 73158M/wk

Sentry Node SDK

Error tracking and performance monitoring for Node.js with OpenTelemetry instrumentation.

MITGid 7059.9M/wk

Sentry React

Official Sentry SDK for React error tracking and performance monitoring.

MITGid 6943.3M/wk

Compare OpenTelemetry with another tool

Get started

Install it.

npm install @opentelemetry/api

Rules for your agent

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.

AgentGid articles about OpenTelemetry

All guides