Skip to content

[blog] Announce JS SDK 2.0 #6574

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 91 additions & 0 deletions content/en/blog/2025/otel-js-sdk-2-0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
---
title: Announcing the OpenTelemetry JavaScript SDK 2.0
linkTitle: OTel JS SDK 2.0
date: 2025-03-26
author: >
[Jamie Danielson](https://github.com/JamieDanielson) (Honeycomb)
sig: OpenTelemetry JS
cSpell:ignore: Danielson
---

Exciting news: [OpenTelemetry JavaScript](/docs/languages/js/) has released [SDK
2.0][v2.0.0]!

[v2.0.0]: https://github.com/open-telemetry/opentelemetry-js/releases/tag/v2.0.0

{{% alert-md title="Migration guide" color="info" %}}

For a detailed description of breaking changes, see the **migration guide**:
[Upgrade to OpenTelemetry JS SDK 2.x][migration guide].

[migration guide]:
https://github.com/open-telemetry/opentelemetry-js/blob/main/doc/upgrade-to-2.x.md

{{% /alert-md %}}

## What is JS SDK 2.x?

JS SDK 2.x encompasses new releases of the `@opentelemetry/*` JavaScript
packages published from the
[`opentelemetry-js` repository](https://github.com/open-telemetry/opentelemetry-js),
except the API and semantic-conventions packages. The package versions for this
new major will be `>=2.0.0` for the stable and `>=0.200.0` for the unstable
packages. Details on the full list of packages can be found in the [migration
guide][].

## What has changed?

In summary:

- The **minimum supported Node.js has been raised to `^18.19.0 || >=20.6.0`**.
This means that support for Node.js 14 and 16 has been dropped.
- The **minimum supported TypeScript version has been raised to 5.0.4**.
- The **compilation target for transpiled TypeScript has been raised to ES2022**
(from ES2017).
- The **public interface has changed**.
- For notes on migrating to 2.x / 0.200.x, see
[the upgrade guide](https://github.com/open-telemetry/opentelemetry-js/tree/main/doc/upgrade-to-2.x.md).

Details:

- [Node.js supported versions](https://github.com/open-telemetry/opentelemetry-js/blob/main/doc/upgrade-to-2.x.md#-nodejs-supported-versions)
- [TypeScript supported versions](https://github.com/open-telemetry/opentelemetry-js/blob/main/doc/upgrade-to-2.x.md#-typescript-supported-versions)
- [ES2022 compilation target](https://github.com/open-telemetry/opentelemetry-js/blob/main/doc/upgrade-to-2.x.md#-es2022-compilation-target)
- [Drop `window.OTEL_*` support in browsers](https://github.com/open-telemetry/opentelemetry-js/blob/main/doc/upgrade-to-2.x.md#-drop-windowotel_-support-in-browsers)
- [`@opentelemetry/resources` API changes](https://github.com/open-telemetry/opentelemetry-js/blob/main/doc/upgrade-to-2.x.md#-opentelemetryresources-api-changes)
- [`@opentelemetry/core` API changes](https://github.com/open-telemetry/opentelemetry-js/blob/main/doc/upgrade-to-2.x.md#-opentelemetrycore-api-changes)
- [Tracing SDK API changes](https://github.com/open-telemetry/opentelemetry-js/blob/main/doc/upgrade-to-2.x.md#-tracing-sdk-api-changes)
- [`@opentelemetry/sdk-metrics` API changes](https://github.com/open-telemetry/opentelemetry-js/blob/main/doc/upgrade-to-2.x.md#-opentelemetrysdk-metrics-api-changes)
- [`@opentelemetry/resources` changes for _implementors_ of Resource Detectors](https://github.com/open-telemetry/opentelemetry-js/blob/main/doc/upgrade-to-2.x.md#-opentelemetryresources-changes-for-implementors-of-resource-detectors)
- [Other changes](https://github.com/open-telemetry/opentelemetry-js/blob/main/doc/upgrade-to-2.x.md#-other-changes)

## Why was this done?

We knew we would gain the greatest benefit by allowing breaking changes to
improve things related to:

- Optimization: removing classes and namespaces to allow better minification and
tree-shaking.
- Better tooling and support: dropping old runtimes and tool versions to take
advantage of enhanced ESM support and simplify documentation.
- Velocity: reducing code complexity and removing deprecated fields for faster
feature and maintenance work.

This also begins our goal of releasing a new SDK major release every year.

For a more detailed explanation of why 2.0, see issue [#4083].

[#4083]: https://github.com/open-telemetry/opentelemetry-js/issues/4083

## How can I get involved?

[v0.200.0]:
https://github.com/open-telemetry/opentelemetry-js/releases/tag/experimental%2Fv0.200.0

- Try out the [v2.0.0] and [v0.200.0] releases and provide feedback.
- Review our
[contributing guide](https://github.com/open-telemetry/opentelemetry-js/blob/main/CONTRIBUTING.md)
for details on contributing.
- Attend our
[SIG meetings](https://groups.google.com/a/opentelemetry.io/g/calendar-js).
- Collaborate on [Slack](https://cloud-native.slack.com/archives/C01NL1GRPQR).
72 changes: 72 additions & 0 deletions static/refcache.json
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,10 @@
"StatusCode": 200,
"LastSeen": "2025-02-02T10:59:14.907548-05:00"
},
"https://cloud-native.slack.com/archives/C01NL1GRPQR": {
"StatusCode": 200,
"LastSeen": "2025-03-20T10:14:45.444428061Z"
},
"https://cloud-native.slack.com/archives/C01NP3BV26R": {
"StatusCode": 200,
"LastSeen": "2024-12-18T05:52:49.606187-05:00"
Expand Down Expand Up @@ -8683,10 +8687,62 @@
"StatusCode": 206,
"LastSeen": "2025-01-16T11:37:42.172729-05:00"
},
"https://github.com/open-telemetry/opentelemetry-js/blob/main/doc/upgrade-to-2.x.md": {
"StatusCode": 206,
"LastSeen": "2025-03-20T10:13:41.886468706Z"
},
"https://github.com/open-telemetry/opentelemetry-js/blob/main/doc/upgrade-to-2.x.md#-drop-windowotel_-support-in-browsers": {
"StatusCode": 206,
"LastSeen": "2025-03-20T10:14:05.826276468Z"
},
"https://github.com/open-telemetry/opentelemetry-js/blob/main/doc/upgrade-to-2.x.md#-es2022-compilation-target": {
"StatusCode": 206,
"LastSeen": "2025-03-20T10:14:01.473606522Z"
},
"https://github.com/open-telemetry/opentelemetry-js/blob/main/doc/upgrade-to-2.x.md#-nodejs-supported-versions": {
"StatusCode": 206,
"LastSeen": "2025-03-20T10:13:54.514932507Z"
},
"https://github.com/open-telemetry/opentelemetry-js/blob/main/doc/upgrade-to-2.x.md#-opentelemetrycore-api-changes": {
"StatusCode": 206,
"LastSeen": "2025-03-20T10:14:11.949279247Z"
},
"https://github.com/open-telemetry/opentelemetry-js/blob/main/doc/upgrade-to-2.x.md#-opentelemetryresources-api-changes": {
"StatusCode": 206,
"LastSeen": "2025-03-20T10:14:09.243229009Z"
},
"https://github.com/open-telemetry/opentelemetry-js/blob/main/doc/upgrade-to-2.x.md#-opentelemetryresources-changes-for-implementors-of-resource-detectors": {
"StatusCode": 206,
"LastSeen": "2025-03-20T10:14:23.176428015Z"
},
"https://github.com/open-telemetry/opentelemetry-js/blob/main/doc/upgrade-to-2.x.md#-opentelemetrysdk-metrics-api-changes": {
"StatusCode": 206,
"LastSeen": "2025-03-20T10:14:19.596391096Z"
},
"https://github.com/open-telemetry/opentelemetry-js/blob/main/doc/upgrade-to-2.x.md#-other-changes": {
"StatusCode": 206,
"LastSeen": "2025-03-20T10:14:25.673601051Z"
},
"https://github.com/open-telemetry/opentelemetry-js/blob/main/doc/upgrade-to-2.x.md#-tracing-sdk-api-changes": {
"StatusCode": 206,
"LastSeen": "2025-03-20T10:14:16.442116351Z"
},
"https://github.com/open-telemetry/opentelemetry-js/blob/main/doc/upgrade-to-2.x.md#-typescript-supported-versions": {
"StatusCode": 206,
"LastSeen": "2025-03-20T10:13:58.466804234Z"
},
"https://github.com/open-telemetry/opentelemetry-js/blob/main/doc/upgrade-to-2.x.md#what-is-js-sdk-2x": {
"StatusCode": 206,
"LastSeen": "2025-03-20T10:13:44.541686095Z"
},
"https://github.com/open-telemetry/opentelemetry-js/discussions": {
"StatusCode": 206,
"LastSeen": "2025-01-13T12:10:34.858443-05:00"
},
"https://github.com/open-telemetry/opentelemetry-js/issues/4083": {
"StatusCode": 206,
"LastSeen": "2025-03-20T10:14:29.294035439Z"
},
"https://github.com/open-telemetry/opentelemetry-js/issues/4551": {
"StatusCode": 206,
"LastSeen": "2025-02-01T06:58:03.438269-05:00"
Expand All @@ -8703,6 +8759,18 @@
"StatusCode": 206,
"LastSeen": "2025-01-07T10:31:44.055855-05:00"
},
"https://github.com/open-telemetry/opentelemetry-js/releases/tag/experimental%2Fv0.200.0": {
"StatusCode": 206,
"LastSeen": "2025-03-20T10:14:38.07150847Z"
},
"https://github.com/open-telemetry/opentelemetry-js/releases/tag/v2.0.0": {
"StatusCode": 206,
"LastSeen": "2025-03-20T10:14:33.420944891Z"
},
"https://github.com/open-telemetry/opentelemetry-js/tree/main/doc/upgrade-to-2.x.md": {
"StatusCode": 206,
"LastSeen": "2025-03-20T10:13:48.375113273Z"
},
"https://github.com/open-telemetry/opentelemetry-js/tree/main/examples/opentelemetry-web": {
"StatusCode": 206,
"LastSeen": "2025-01-16T11:37:42.389939-05:00"
Expand Down Expand Up @@ -13475,6 +13543,10 @@
"StatusCode": 200,
"LastSeen": "2025-01-17T12:58:38.699931Z"
},
"https://groups.google.com/a/opentelemetry.io/g/calendar-js": {
"StatusCode": 200,
"LastSeen": "2025-03-20T10:14:41.765468714Z"
},
"https://groups.google.com/a/opentelemetry.io/g/calendar-maintainer-meeting": {
"StatusCode": 200,
"LastSeen": "2025-02-01T07:12:03.939344-05:00"
Expand Down