getsentry / profiling-node

The code for this repo now lives in https://github.com/getsentry/sentry-javascript/tree/develop/packages/profiling-node
MIT License
28 stars 10 forks source link

sentry_cpu_profiler-linux-arm64-glibc-120.node does not exist #212

Closed andrewpile closed 7 months ago

andrewpile commented 7 months ago

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

SDK Version

1.2.6

Link to Sentry event

No response

What environment is your node script running in?

How is your code deployed and bundled?

Bundled with esbuild

Steps to Reproduce

I installed @sentry/profiling-node and included it in the codebase normally. On execution I'm seeing this error: Error: Cannot find module '/app/node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-linux-arm64-glibc-120.node' (note the glibc-120).

At first I thought this was as simple as instructing esbuild to include the binary as an external since normally .node wouldn't be bundled, but then I saw that the glibc-120 binary doesn't actually exist?

$ ls /app/node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-linux-arm64-glibc-120.node
ls: cannot access '/app/node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-linux-arm64-glibc-120.node': No such file or directory

$ ls /app/node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-linux-arm64-glibc-*
/app/node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-linux-arm64-glibc-108.node
/app/node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-linux-arm64-glibc-115.node
/app/node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-linux-arm64-glibc-83.node
/app/node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-linux-arm64-glibc-93.node

Expected Result

Profiling library is loaded

Actual Result

App crashes at startup

andrewpile commented 7 months ago

It occurs to me that this is because I'm using node v21 and that docker image must be using a different glibc? It might be worth adding supported glibc version to the docs. Closing!

andrewpile commented 7 months ago

I rolled back to the node:20-slim image and it worked!

JonasBa commented 7 months ago

@andrewpile we do not support non-LTS nodejs release versions and as far as I'm aware it is not advisable to use them for production systems