Skip to content
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

[sdk] set min-supported Node.js to ^18.19.0 || >=20.6.0 #5395

Closed
trentm opened this issue Jan 29, 2025 · 0 comments · Fixed by #5397
Closed

[sdk] set min-supported Node.js to ^18.19.0 || >=20.6.0 #5395

trentm opened this issue Jan 29, 2025 · 0 comments · Fixed by #5397
Assignees
Labels
target:next-major-release This PR targets the next major release (`next` branch)

Comments

@trentm
Copy link
Contributor

trentm commented Jan 29, 2025

For the SDK 2.0 work we have bumped the min-supported node to v18, without being more explicit than this. In package.json files, we generally have:

  "engines": {
    "node": ">=18"
  },

Technically this means anything 18.0.0 or later is supported, though, of course, "engines" is advisory.


I propose that we set our min-supported Node.js versions to ^18.19.0 || >=20.6.0.

These are the versions (https://nodejs.org/en/blog/release/v18.19.0 released Nov 2023, https://nodejs.org/en/blog/release/v20.6.0 released Sep 2023) where the module.register() Node.js API was added. Having these as our base Node.js versions will vastly simplify our documentation for supporting zero-code instrumentation of ESM code -- once we are using module.register() (#4933) -- because it means we will no longer need to use --experimental-loader=@opentelemetry/instrumentation/hook.mjs.

With TypeScript, CommonJS, ESM, bundling, et al, we already have enough / too much complexity to explain to users for bootstrapping instrumentation.

@trentm trentm added this to the OpenTelemetry SDK 2.0 milestone Jan 29, 2025
@trentm trentm self-assigned this Jan 29, 2025
trentm added a commit to trentm/opentelemetry-js that referenced this issue Jan 29, 2025
This raises the min-supported Node.js version on all packages
except the 'api' and 'semantic-conventions' packages.
This new minimum allows the usage of 'module.register()'
for better ESM instrumentation support.

Closes: open-telemetry#5395
@pichlermarc pichlermarc added the target:next-major-release This PR targets the next major release (`next` branch) label Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
target:next-major-release This PR targets the next major release (`next` branch)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants