Packages

@opentelemetry/core

3.1.1 · 9 Nov 2026Apache-2.0229.6M / weekRepositoryHomepagenpmAtom feed

Your version

3.0.0

major20 Oct 2026Where it was published

3.1.1 is the newest release of 3.x.

In short

11 breaking7 removed1 deprecated3 fixed19 internal

  • Breaking

    The minimum supported Node.js has been raised to >=22.15.0. This means that support for Node.js 18 and 20 has been dropped.

  • Breaking

    Only experimental versions 0.300.0 are compatible with this release

  • Breaking

    feat!: migrate package builds from tsc to tsdown, emitting dual CJS/ESM output from a single dist/ directory and declaring an exports map on every package

  • Breaking

    Deep imports into the build output no longer resolve. An exports map is an allowlist that Node.js and bundlers enforce, so specifiers such as @opentelemetry/core/build/src/... or @opentelemetry/core/build/esm/... now fail with ERR_PACKAGE_PATH_NOT_EXPORTED. Rewriting them to the new file layout does not help — unlisted subpaths are rejected whether or not the file exists.

  • Breaking

    The emitted files moved out of build/src (CJS), build/esm and build/esnext (ESM) into dist/, using .cjs/.mjs extensions with matching .d.cts/.d.mts declarations.

  • Breaking

    <package>/package.json is no longer importable for the same reason. Read a package's version from your own dependency metadata, or use SDK_INFO from @opentelemetry/core for the SDK version.

  • Breaking

    chore!: bump minimum node.js version to >=22.15.0

  • Breaking

    feat!: replace the browser field in package.json with #platform subpath imports

Release note

Summary

  • The minimum supported Node.js has been raised to >=22.15.0. This means that support for Node.js 18 and 20 has been dropped.

  • The public interface has changed

  • Only experimental versions 0.300.0 are compatible with this release

:boom: Breaking Changes

  • Breaking

    sdk-trace-node: Remove the @opentelemetry/sdk-trace-node package #7054

  • Breaking

    shim-opentracing: Remove the @opentelemetry/shim-opentracing package

  • Breaking

    context-async-hooks: Remove the unused class AsyncHooksContextManager #7078

  • Breaking

    Migrate package builds from tsc to tsdown, emitting dual CJS/ESM output from a single dist/ directory and declaring an exports map on every package #6293

    • Importing a package by its name is unaffected in both CommonJS and ESM, as is every subpath listed in its exports map.

    • Deep imports into the build output no longer resolve. An exports map is an allowlist that Node.js and bundlers enforce, so specifiers such as @opentelemetry/core/build/src/... or @opentelemetry/core/build/esm/... now fail with ERR_PACKAGE_PATH_NOT_EXPORTED. Rewriting them to the new file layout does not help — unlisted subpaths are rejected whether or not the file exists.

    • The emitted files moved out of build/src (CJS), build/esm and build/esnext (ESM) into dist/, using .cjs/.mjs extensions with matching .d.cts/.d.mts declarations.

    • <package>/package.json is no longer importable for the same reason. Read a package's version from your own dependency metadata, or use SDK_INFO from @opentelemetry/core for the SDK version.

    • The non-standard esnext entry point has been removed; tools that preferred it fall back to module (ESM) or main (CJS).

    • Packages that ship separate Node.js and browser implementations export them under explicit subpaths, for example @opentelemetry/core/platform. If you depend on something that is only reachable through a deep import, please open an issue so it can be considered for the public API.

  • Breaking

    core: Remove deprecated getTimeOrigin, otperformance, _globalThis, and unrefTimer from @opentelemetry/core #7053

    • getTimeOrigin() — use performance.timeOrigin directly.

    • otperformance — use the global performance object directly.

    • _globalThis — use globalThis directly.

    • unrefTimer(timer) — call timer.unref() directly in your own code.

  • Breaking

    sdk-trace: Remove deprecated TracerProviderOptions.forceFlushTimeoutMillis #7057

    • Pass timeoutMillis to provider.forceFlush({ timeoutMillis }) instead. The default timeout is 30000ms.

  • Breaking

    propagator-jaeger: Remove @opentelemetry/propagator-jaeger package #7077

    • The Jaeger propagator is deprecated by the OpenTelemetry specification in favour of W3CTraceContextPropagator. Use W3CTraceContextPropagator from @opentelemetry/core instead.

    • See the 3.x migration guide for full instructions.

  • Breaking

    exporter-jaeger: Remove @opentelemetry/exporter-jaeger package

    • The Jaeger exporter has been removed. Jaeger has deprecated its custom Thrift collection protocols in favor of standard OpenTelemetry Protocol (OTLP). Use standard OTLP exporters instead.

    • See the 3.x migration guide for full instructions.

  • Breaking

    Bump minimum node.js version to >=22.15.0

  • Breaking

    sdk-trace-base, sdk-trace-web: Remove the @opentelemetry/sdk-trace-base and @opentelemetry/sdk-trace-web packages #7117

  • Breaking

    Replace the browser field in package.json with #platform subpath imports #7141

    • Resolvers with the node condition load the Node.js build; all others load the browser build. Bundlers without imports support fail; see the migration guide.

    • webpack needs 5.54 or later. Parcel needs package exports enabled and cannot resolve #platform from require().

    • Root type declarations describe the Node.js build.

  • Breaking

    resources: Remove the ./detectors/platform and ./detectors/platform/browser subpath exports; import from the package root #7141

  • Breaking

    core, sdk-trace, sdk-logs, exporter-zipkin: Remove the ./platform and ./platform/browser subpath exports; import from the package root #7141

  • Breaking

    sdk-logs: Replace LoggerConfig.disabled with enabled to match the specification #7160

    • Replace disabled: true with enabled: false, and disabled: false with enabled: true. Loggers remain enabled by default.

:rocket: Features

  • sdk-metrics: Stabilize maxExportBatchSize option in PeriodicExportingMetricReader

  • Deprecated

    sdk-trace, sdk-logs: Add the browser-only disableAutoFlushOnDocumentHide to BatchSpanProcessorOptions and BatchLogRecordProcessorOptions, deprecate BatchSpanProcessorBrowserOptions and BatchLogRecordProcessorBrowserOptions #7140

:bug: Bug Fixes

  • sdk-metrics: Guard against a missing or empty name to MeterProvider#getMeter #7105

  • Resolve the ESM build through the default export condition instead of import, so a resolver that activates neither import nor require still finds an entry point #7132

  • sdk-trace: Make the Node.js RandomIdGenerator id generators prototype methods, so subclasses can override them #7190

  • sdk-logs: Report a rejected document-hide flush to the global error handler #7187

  • sdk-trace: Count attributes passed to startSpan toward attributeCountLimit #7176

  • resources: Stop reading globalThis.process in the browser build #7173

  • core: Return false instead of undefined from the browser getBooleanFromEnv #7188

  • core: No longer drop an attribute value that is an object that has undefined properties #7207

    • isAnyValue() now returns true for {aStr: 'bob', anUndefined: undefined}. This restores the behavior of the old isLogAttributeValue from version 2.x of the sdk-logs package.

    • "Cleaning" of attributes, by cleanAttributes() and maybeAddAttribute(), will now drop undefined properties from objects. For example, logger.emit(attributes: {myAttr: {aStr: 'bob', anUndefined: undefined}, ...) will include attributes: {myAttr: {aStr: 'bob'}}.

:house: Internal

  • verify-pack: Read the npm 12 pack --json output, which is keyed by package name instead of an array #7133

  • karma: Resolve plugins and the process shim from the repo root, so browser tests run with isolated installs #7137

  • nx: Key the version target defaults by the target name, so a cache hit restores the generated src/version.ts #7134

  • nx: Make the test, test:browser and test:webworker targets compile their dependencies first, since tests load dependencies from their dist #7139

  • verify-pack: Extract tarballs under the root node_modules, so workspace dependencies resolve and entry points load fully instead of being skipped #7138

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.