DevOps

How to Upgrade to OpenTelemetry JS SDK 3.0: Breaking Changes and a Migration Checklist

OpenTelemetry JavaScript SDK 3.0 raises the Node.js floor and renames core tracing classes. Here is what breaks and how to verify the upgrade.

Paige Donnelly

Senior Backend Engineer

Published 7 min read
Computers and analytical graphs on a monitor in a professional workspace, representing telemetry dashboards.
On this page 6 sections

OpenTelemetry JavaScript SDK 3.0 raises the minimum Node.js version to 22.15.0, replaces sdk-trace-base with sdk-trace, folds the logs API into @opentelemetry/api and removes the Jaeger packages. Services that only use auto-instrumentations-node need little change. Hand-built tracing setups need code edits and a staging check before rollout.

This guide covers the upgrade to OpenTelemetry JS SDK 3.0 for backend engineers who own Node.js services and their telemetry. It lists what breaks, the exact renames, and the checks that catch a quiet failure. Backtrace covers developer tooling, and a telemetry upgrade deserves extra care because a broken tracer hides the very problem you would use it to find.

What Changed in OpenTelemetry JS SDK 3.0?

SDK 3.0 is a major release of the core OpenTelemetry JavaScript packages. It raises the Node.js floor, ships real ESM and CommonJS exports, stabilizes the Logs signal and removes several deprecated packages. The API package itself stays compatible, so libraries that depend only on the API do not need a new major version.

Close-up of code displayed on a computer monitor, the kind of source you edit during an SDK migration.

The OpenTelemetry announcement dated November 5, 2026 lists the headline changes. The stable packages move to 3.0.0 and the experimental ones to 0.300.0. The jump to 0.300 is deliberate and marks the 3.x generation. The API moves only to 1.10.0.

The Node.js floor is the change most likely to stop a build. Packages now require 22.15.0 or newer, which drops Node 18 and 20. Node 20 reached end of life in April 2026, so staying on it was already a risk. The November Node.js security advisory shows why: end-of-life lines get no fixes. Our guide on patching Node.js after that release covers the version checks you should finish first.

With Logs stable, all three signals (traces, metrics and logs) are now stable in JavaScript. That removes a common reason to delay adopting logs through OpenTelemetry. It also explains why the logs API moved into the main API package.

The other changes fall into five groups:

  • Every package defines entry points through exports, so deep imports into internal paths fail.
  • The @opentelemetry/api-logs package is gone, and its code now lives in @opentelemetry/api.
  • Span attributes and log attributes accept complex values. Resource and metric attributes still accept only simple ones.
  • The Jaeger propagator, the Jaeger exporter and the OpenTracing and OpenCensus shims are removed.
  • Several public classes and types are renamed or moved.

Do You Need to Change Code to Upgrade?

It depends on how you wire OpenTelemetry. Services that only use the zero-code @opentelemetry/auto-instrumentations-node package need no code changes. Services that build providers, processors or exporters by hand should expect class renames, constructor changes and removed packages, so plan a short migration and a staging test before release.

The OpenTelemetry team says the API package has no breaking changes, and zero-code users do not need to change. That covers many services. The Node.js floor still applies to everyone, so check your runtime first.

Hand-built setups are the real work. You need changes if any of these are true:

  1. You import from @opentelemetry/sdk-trace-base, sdk-trace-node or sdk-trace-web.
  2. You import from @opentelemetry/api-logs.
  3. You use AsyncHooksContextManager from the context-async-hooks package.
  4. You import Jaeger, OpenTracing or OpenCensus packages.
  5. You reach into a package with a deep import such as @opentelemetry/core/build/src/....

The first failure you will see is usually ERR_PACKAGE_PATH_NOT_EXPORTED from a deep import, or a module-not-found error for a removed package. Search your lockfile with npm ls | grep opentelemetry and your source with grep -rn "@opentelemetry/" src to find every touchpoint before you bump versions.

How to Migrate Tracing Code From sdk-trace-base to sdk-trace

Install @opentelemetry/sdk-trace, remove the three old tracing packages, and update class names and constructors. Most edits are mechanical. Work through them in order and run your type checker after each step.

The details are in the official 3.x migration guide. The changes below come straight from it.

First, the provider class is renamed. BasicTracerProvider becomes TracerProvider. The generalLimits constructor option is no longer supported, so merge those limits into spanLimits yourself.

Second, span processors take an options object. The exporter moves inside it:

text
// before
new BatchSpanProcessor(exporter, { maxQueueSize: 2048 });
new SimpleSpanProcessor(exporter);

// after
new BatchSpanProcessor({ exporter, maxQueueSize: 2048 });
new SimpleSpanProcessor({ exporter });

Third, logs imports change. Remove @opentelemetry/api-logs with npm uninstall and import logs and SeverityNumber from @opentelemetry/api. One detail trips up wrappers: logs.setGlobalLoggerProvider() now returns a boolean instead of the provider. Call logs.getLoggerProvider() when you need the instance.

Fourth, swap the context manager. AsyncHooksContextManager becomes AsyncLocalStorageContextManager, which the guide describes as the recommended Node.js API for context propagation.

Last, replace removed Jaeger packages. If you still export to Jaeger, send OTLP instead. Jaeger accepts OTLP natively, so the backend rarely has to change. Check your own deployment before relying on that.

Deep imports need a separate pass. Every package now defines its entry points through exports, so a path into a package's internal build folder no longer resolves. Import from the package name instead. If your code read the SDK version from a package.json file, use SDK_INFO from @opentelemetry/core, because package.json is no longer importable.

The guide also lists bundler requirements for packages with platform-specific code. Read that section if you ship telemetry from a browser app or bundle a server. Test a production build, not only the dev server.

Which Environment Variables Does the Tracer Stop Reading?

The new TracerProvider stops reading several environment variables, including OTEL_TRACES_SAMPLER, OTEL_TRACES_SAMPLER_ARG and the span and attribute limit variables. BatchSpanProcessor also stops reading the OTEL_BSP_* variables for queue size, batch size, delay and export timeout. Set these values in code or use sdk-node.

Digital display of performance metrics and data analysis charts, representing trace and sampling volume checks.

This is the change most likely to hide. The code compiles, the service starts and traces still flow. Yet a sampler you set through an environment variable in your deployment config is no longer applied by a hand-built provider. Limits on span events, links and attribute counts can change the same way.

Think about who set these variables. Platform teams often put sampling ratios in a shared deployment template, so an application developer may not know they exist. Search your Helm charts, Kubernetes manifests and Dockerfiles for OTEL_ before you start, and list which services depend on each one.

The guide recommends the sdk-node package if you rely on environment-based configuration. It keeps reading the standard SDK variables. If you can switch to it, you get the old behavior with less code. If you must keep a hand-built provider, pass the sampler and limits explicitly in code.

Verify the result with numbers, not hope. Compare three values between the old and new builds in staging:

  • Spans exported per minute at the same request rate.
  • Average attributes per span on a busy route.
  • Batch export failures and dropped-span counters from the exporter.

A large change in span volume almost always points at a sampler that stopped applying. A sudden drop in attributes points at limits. Backtrace's editors suggest recording these three numbers before the upgrade so the comparison has a baseline.

How to Roll Out the Upgrade Safely

Upgrade one service first, run both versions side by side, and compare telemetry before the fleet moves. Telemetry code touches every request, so a bad release hurts everything at once. A staged rollout limits the blast radius.

A developer working on programming tasks across multiple screens in a dimly lit room.

A safe order looks like this:

  1. Move the runtime to Node.js 22.15.0 or newer and ship that change alone.
  2. Pin all @opentelemetry/* stable packages to the same 3.x version and all experimental ones to 0.300.x.
  3. Migrate one low-traffic service and deploy it to staging.
  4. Compare span volume, attributes and exporter errors against the baseline.
  5. Roll out service by service, keeping the last known good image ready.

Rebuild container images from scratch so no stale layer keeps a removed package. Our test plan for upgrading to Docker Engine 29.9.1 shows how to structure that kind of check. The parallel-run idea also appears in our guide to moving ElastiCache from Redis to Valkey, where blue/green deployment keeps a rollback path open.

Keep the previous lockfile in version control and tag the last good image. A telemetry regression is easy to miss because dashboards simply go quiet. An alert on span count dropping below a floor turns that silence into a signal, and it is the cheapest safety net in this upgrade.

You are not forced to move this week. The project says 2.x of the stable packages stays supported for one year from the 3.0.0 release. Use that time to migrate carefully, though do not wait until the last month.

Conclusion

The SDK 3.0 upgrade is small for zero-code users and moderate for anyone with a hand-built provider. Raise Node.js to 22.15.0 or newer, migrate to sdk-trace, fix the logs imports and replace removed packages.

If you are still on Node.js 20 or older, that move comes first and is its own project. Treat the runtime upgrade and the SDK upgrade as two releases, so a failure points at one cause.

Then spend your testing time on the quiet change: environment variables the provider no longer reads. Compare span volume before and after in staging. If the numbers match, roll out service by service.

What is the minimum Node.js version for OpenTelemetry JS SDK 3.0?
SDK 3.0 requires Node.js 22.15.0 or newer for all packages except @opentelemetry/api and semantic-conventions, which keep wider minimums. Support for Node.js 18 and 20 is dropped because both reached end of life. Upgrade the runtime first, then move the OpenTelemetry packages in a separate release.
Do I need to change my code if I use auto-instrumentations-node?
Usually not. The OpenTelemetry team says users of the zero-code auto-instrumentations-node package do not need to change anything, and the API package has no breaking changes. You still need Node.js 22.15.0 or newer, so check your runtime and container images before you bump any versions.
What replaces sdk-trace-base in OpenTelemetry JS 3.0?
The @opentelemetry/sdk-trace package replaces sdk-trace-base, sdk-trace-node and sdk-trace-web. BasicTracerProvider is renamed TracerProvider, and span processors now take an options object that includes the exporter. The new provider also stops reading sampler and limit environment variables, so set those values explicitly.
How long will OpenTelemetry JS SDK 2.x stay supported?
The stable 2.x packages are supported for one year from the 3.0.0 release, following OpenTelemetry's versioning guidelines. That gives teams time to migrate service by service. Plan the upgrade inside that window rather than at the end of it, and migrate low-traffic services first.

Written by

Paige Donnelly

Senior Backend Engineer

8+ years experience

Paige Donnelly is a senior backend engineer who has spent the last eight years working on distributed systems, first at a mid-size fintech and then leading a payments infrastructure team through a migration from a monolith to event-driven services. She's on the losing end of more 3am pages than she'd like to admit, which is why she writes about observability, deployment safety, and API design with an eye toward what actually breaks in production rather than what looks good in a conference talk. She contributes to a couple of open-source CLI tools in her spare time and still refuses to use a debugger for anything she can solve with well-placed logs.

Credentials

  • 8 years in backend and distributed systems engineering
  • Former tech lead, payments infrastructure at a Series D fintech
  • Contributor to several open-source developer tooling projects