Skip to content

chore: support opentelemetry v2 #1741

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

JackTreble
Copy link

@JackTreble JackTreble commented Jul 14, 2025

What was changed

Support OpenTelemetry v2

Why?

So the latest versions of OpenTelemetry are supported going forward
This was a fairly naive update libraries job using the upgrade docs as a guide and the otel tests to check behaviour.

If you're reading this months in the future feel free to take on this PR, I may forget to come back to it!

Checklist

  1. Closes [Feature Request] Add support for opentelemetry v2 #1658

  2. How was this tested:

  • Using the test suite, although some unrelated tests failed locally. might be my setup?
  1. Any docs updates needed?

@CLAassistant
Copy link

CLAassistant commented Jul 14, 2025

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@JackTreble JackTreble marked this pull request as ready for review July 14, 2025 00:35
@JackTreble JackTreble requested a review from a team as a code owner July 14, 2025 00:35
@mjameswh
Copy link
Contributor

@JackTreble Thanks for your work on this, that looks awesome.

I'm a bit worried that this might be a breaking change for our users. Anything you can say about that? I suppose, for example, that users will need to simultaneously change their own code to also use OTel 2, and possibly also upgrade other OTel integration modules they have, right? Does OTel provide guidance for a smooth upgrade path?

In any case, we'll need to cross that bridge at one point or another, so I'd consider merging this as part of our next minor release. In the mean time, I'll leave this PR pending.

@JackTreble
Copy link
Author

@mjameswh Cheers.

I'm a bit worried that this might be a breaking change for our users

Yeah I think this change might be difficult to navigate,
From trying out the upgrade locally I only had to make minimal changes but that isn't going to be the same for everyone.

I think the best way forward could be be to retain support and add support for v2 in a separate package, allowing users to upgrade when best suits them.

I might be worrying about nothing but is there a risk that introducing this change increases the minimum supported node and typescript versions of this library?

I've not looked into what the minimum supported versions of the sdk are & how this minimum requirement in one module may affect the other modules so this might be a moot point.

Minimum supported versions from release notes

  • 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) for all packages

Does OTel provide guidance for a smooth upgrade path?

The guidance on the repo is pretty comprehensive https://github.com/open-telemetry/opentelemetry-js/blob/main/doc/upgrade-to-2.x.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] Add support for opentelemetry v2
3 participants