Skip to content

sentry-prune-profiler-binaries does not recognize NodeJS 22 as a valid major node version #14488

Description

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/aws-serverless

SDK Version

8.40.0

Framework Version

NodeJS v22

Link to Sentry event

No response

Reproduction Example/SDK Setup

My package.json dependencies:

    "@sentry/aws-serverless": "^8.40.0",
    "@sentry/profiling-node": "^8.40.0",

As part of my webpack build for my lambda I copy the sentry profile binaries from the Sentry node package ('./node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-*.node') and strip them with the command:

node_modules/.bin/sentry-prune-profiler-binaries --target_dir_path=./dist/lambda/sentry --target_platform=linux --target_node=22 --target_stdlib=glibc --target_arch=x64

This command used to be --target_node=20, but with AWS Lambda supporting v22 I changed it to v22.

However, the command gives as output:
❌ Sentry: Invalid node version passed as argument, please make sure --target_node is a valid major node version. Supported versions are 16, 18 and 20.

As NodeJS become LTS last month, I was expecting the pruner to have support for this. Hopefully it is only a matter of adding the integer to the code.

I found the check to reside here:

Steps to Reproduce

  1. Run yarn install with the example dependencies.
  2. Copy the sentry_cpu_profiles nodes to the destination folder.
  3. Running the sentry prune script.

Expected Result

One left-over files from the prune list, without error.

Actual Result

Error not supporting NodeJS v22

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Package: profiling-nodeIssues related to the Sentry Profiling Node SDK

    Type

    Projects

    • Status

      Waiting for: Product Owner

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions