@opentelemetry/core
3.1.1 · 9 Nov 2026Apache-2.0229.6M / weekRepositoryHomepagenpmAtom feed
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.0are compatible with this release - Breaking
feat!: migrate package builds from
tsctotsdown, emitting dual CJS/ESM output from a singledist/directory and declaring anexportsmap on every package - Breaking
Deep imports into the build output no longer resolve. An
exportsmap is an allowlist that Node.js and bundlers enforce, so specifiers such as@opentelemetry/core/build/src/...or@opentelemetry/core/build/esm/...now fail withERR_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/esmandbuild/esnext(ESM) intodist/, using.cjs/.mjsextensions with matching.d.cts/.d.mtsdeclarations. - Breaking
<package>/package.jsonis no longer importable for the same reason. Read a package's version from your own dependency metadata, or useSDK_INFOfrom@opentelemetry/corefor the SDK version. - Breaking
chore!: bump minimum node.js version to >=22.15.0
- Breaking
feat!: replace the
browserfield inpackage.jsonwith#platformsubpath 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
for notes on migrating to 3.x / 0.300.x see the upgrade guide
Only experimental versions
0.300.0are compatible with this release
:boom: Breaking Changes
- Breaking
sdk-trace-node: Remove the
@opentelemetry/sdk-trace-nodepackage #7054The sdk-trace-node package has been replaced by the
@opentelemetry/sdk-tracepackage.
See the 3.x migration guide for full migration instructions.
- Breaking
shim-opentracing: Remove the
@opentelemetry/shim-opentracingpackageIn the OpenTelemetry Specification v1.58.0 the OpenTracing compatibility requirements were deprecated. The JavaScript OpenTracing shim package will not receive any more releases after the current 2.11.0 release (source code for last release).
- Breaking
context-async-hooks: Remove the unused class
AsyncHooksContextManager#7078 - Breaking
Migrate package builds from
tsctotsdown, emitting dual CJS/ESM output from a singledist/directory and declaring anexportsmap on every package #6293Importing a package by its name is unaffected in both CommonJS and ESM, as is every subpath listed in its
exportsmap.Deep imports into the build output no longer resolve. An
exportsmap is an allowlist that Node.js and bundlers enforce, so specifiers such as@opentelemetry/core/build/src/...or@opentelemetry/core/build/esm/...now fail withERR_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/esmandbuild/esnext(ESM) intodist/, using.cjs/.mjsextensions with matching.d.cts/.d.mtsdeclarations.<package>/package.jsonis no longer importable for the same reason. Read a package's version from your own dependency metadata, or useSDK_INFOfrom@opentelemetry/corefor the SDK version.The non-standard
esnextentry point has been removed; tools that preferred it fall back tomodule(ESM) ormain(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, andunrefTimerfrom@opentelemetry/core#7053getTimeOrigin()— useperformance.timeOrigindirectly.otperformance— use the globalperformanceobject directly._globalThis— useglobalThisdirectly.unrefTimer(timer)— calltimer.unref()directly in your own code.
- Breaking
sdk-trace: Remove deprecated
TracerProviderOptions.forceFlushTimeoutMillis#7057Pass
timeoutMillistoprovider.forceFlush({ timeoutMillis })instead. The default timeout is 30000ms.
- Breaking
propagator-jaeger: Remove
@opentelemetry/propagator-jaegerpackage #7077The Jaeger propagator is deprecated by the OpenTelemetry specification in favour of
W3CTraceContextPropagator. UseW3CTraceContextPropagatorfrom@opentelemetry/coreinstead.See the 3.x migration guide for full instructions.
- Breaking
exporter-jaeger: Remove
@opentelemetry/exporter-jaegerpackageThe 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-baseand@opentelemetry/sdk-trace-webpackages #7117The sdk-trace-base, sdk-trace-web, and sdk-trace-node packages have been replaced by the
@opentelemetry/sdk-tracepackage.
See the 3.x migration guide for full migration instructions.
- Breaking
Replace the
browserfield inpackage.jsonwith#platformsubpath imports #7141Resolvers with the
nodecondition load the Node.js build; all others load the browser build. Bundlers withoutimportssupport fail; see the migration guide.webpack needs 5.54 or later. Parcel needs package exports enabled and cannot resolve
#platformfromrequire().Root type declarations describe the Node.js build.
- Breaking
resources: Remove the
./detectors/platformand./detectors/platform/browsersubpath exports; import from the package root #7141 - Breaking
core, sdk-trace, sdk-logs, exporter-zipkin: Remove the
./platformand./platform/browsersubpath exports; import from the package root #7141 - Breaking
sdk-logs: Replace
LoggerConfig.disabledwithenabledto match the specification #7160Replace
disabled: truewithenabled: false, anddisabled: falsewithenabled: true. Loggers remain enabled by default.
:rocket: Features
sdk-metrics: Stabilize
maxExportBatchSizeoption inPeriodicExportingMetricReader- Deprecated
sdk-trace, sdk-logs: Add the browser-only
disableAutoFlushOnDocumentHidetoBatchSpanProcessorOptionsandBatchLogRecordProcessorOptions, deprecateBatchSpanProcessorBrowserOptionsandBatchLogRecordProcessorBrowserOptions#7140
:bug: Bug Fixes
sdk-metrics: Guard against a missing or empty name to MeterProvider#getMeter #7105
Resolve the ESM build through the
defaultexport condition instead ofimport, so a resolver that activates neitherimportnorrequirestill finds an entry point #7132sdk-trace: Make the Node.js
RandomIdGeneratorid generators prototype methods, so subclasses can override them #7190sdk-logs: Report a rejected document-hide flush to the global error handler #7187
sdk-trace: Count attributes passed to
startSpantowardattributeCountLimit#7176resources: Stop reading
globalThis.processin the browser build #7173core: Return
falseinstead ofundefinedfrom the browsergetBooleanFromEnv#7188core: No longer drop an attribute value that is an object that has
undefinedproperties #7207isAnyValue()now returns true for{aStr: 'bob', anUndefined: undefined}. This restores the behavior of the oldisLogAttributeValuefrom version 2.x of thesdk-logspackage."Cleaning" of attributes, by
cleanAttributes()andmaybeAddAttribute(), will now drop undefined properties from objects. For example,logger.emit(attributes: {myAttr: {aStr: 'bob', anUndefined: undefined}, ...)will includeattributes: {myAttr: {aStr: 'bob'}}.
:house: Internal
verify-pack: Read the npm 12
pack --jsonoutput, which is keyed by package name instead of an array #7133karma: Resolve plugins and the
processshim from the repo root, so browser tests run with isolated installs #7137nx: Key the
versiontarget defaults by the target name, so a cache hit restores the generatedsrc/version.ts#7134nx: Make the
test,test:browserandtest:webworkertargets compile their dependencies first, since tests load dependencies from theirdist#7139verify-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.