About this project

OpenTelemetry JavaScript is the JavaScript implementation of OpenTelemetry, a vendor-neutral framework for collecting traces, metrics and logs from applications. It targets Node.js and web browsers and is published as a set of npm packages under the @opentelemetry scope. The project separates concerns into an API layer and SDK implementations. The API package provides TypeScript interfaces, enums and no-op implementations for the core trace and metrics model, so library authors can depend only on the public API without pulling in a specific SDK. The core package supplies default and no-op implementations. On the SDK side, sdk-trace offers control over instrumentation and span creation without loading async_hooks or instrumentation by default, while sdk-metrics provides instruments and meters for reporting time-series data. Getting started typically involves installing @opentelemetry/api, @opentelemetry/sdk-node and the auto-instrumentations-node meta package, then creating a tracing setup file that configures a NodeSDK with a resource, an exporter such as ConsoleSpanExporter, and auto-instrumentations. The application is then started with the tracing file preloaded. A diagnostics logger can be enabled through the API to debug cases where telemetry is not reaching a collector. Feature status is documented per signal: tracing and metrics are stable in both API and SDK, while logs are still in development. The README also publishes a compatibility matrix pairing stable package versions with experimental package versions, and notes that stable packages share one version line while experimental packages share another. Supported runtimes include current Node.js LTS releases, with browser instrumentation described as experimental and largely unspecified; the minimum language feature baseline is ECMAScript 2022. TypeScript support follows a two-year support window. Exporters are vendor-agnostic, and a registry lists available exporter implementations, while users can also write their own. Automatic tracing is available through instrumentations, with core Node instrumentations for gRPC and HTTP, core web instrumentations for XMLHttpRequest and fetch, and additional contrib instrumentations hosted in a separate repository. The project is Apache-2.0 licensed and welcomes contributions through up-for-grabs and good-first-issue tags, with a weekly SIG meeting.