Closed
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/node
SDK Version
8.17.0
Framework Version
@sentry/node 8.17.0
Link to Sentry event
No response
SDK Setup/Reproduction Example
// Import with `import * as Sentry from "@sentry/node"` if you are using ESM
const Sentry = require("@sentry/node");
const { nodeProfilingIntegration } = require("@sentry/profiling-node");
Sentry.init({
dsn: "https://<my-key>.ingest.us.sentry.io/4507555508453376",
integrations: [nodeProfilingIntegration()],
// Performance Monitoring
tracesSampleRate: 1.0, // Capture 100% of the transactions
// Set sampling rate for profiling - this is relative to tracesSampleRate
profilesSampleRate: 1.0,
});
Steps to Reproduce
- Install and setup Sentry for Fastify according to the guide
- Run project successfully on arm64 Mac
- Move project to 32-bit debian (raspberry pi OS)
- Run project
- Notice that the application crashes (See error in "Actual Result" section)
Expected Result
If precompiled binary is not found for the dynamically constructed source path, there should be fallback functionality that builds the required binary from source. In this case, for 32-bit linux.
Otherwise, if there is no automatic fallback behavior, there should be steps outlining a manual approach in the setup guide.
Actual Result
Notice the following error when running line require("@sentry/profiling-node")
in Fastify app:
Error: Cannot find module '/home/node/app/node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-linux-arm-glibc-115.node'
Require stack:
- /home/node/app/node_modules/@sentry/profiling-node/lib/cjs/index.js
- /home/node/app/instrument.js
- /home/node/app/app.js
- /home/node/app/node_modules/fastify-cli/util.js
- /home/node/app/node_modules/fastify-cli/args.js
- /home/node/app/node_modules/fastify-cli/start.js
- /home/node/app/node_modules/fastify-cli/cli.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)
at Module._load (node:internal/modules/cjs/loader:986:27)
at Module.require (node:internal/modules/cjs/loader:1233:19)
at require (node:internal/modules/helpers:179:18)
at importCppBindingsModule (/home/node/app/node_modules/@sentry/profiling-node/lib/cjs/index.js:166:10)
at Object.<anonymous> (/home/node/app/node_modules/@sentry/profiling-node/lib/cjs/index.js:169:36)
at Module._compile (node:internal/modules/cjs/loader:1358:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
at Module.load (node:internal/modules/cjs/loader:1208:32)
at Module._load (node:internal/modules/cjs/loader:1024:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/home/node/app/node_modules/@sentry/profiling-node/lib/cjs/index.js',
'/home/node/app/instrument.js',
'/home/node/app/app.js',
'/home/node/app/node_modules/fastify-cli/util.js',
'/home/node/app/node_modules/fastify-cli/args.js',
'/home/node/app/node_modules/fastify-cli/start.js',
'/home/node/app/node_modules/fastify-cli/cli.js'
]
| }
exited with code 1
Notice that @sentry/profiling-node
is trying to use a precompiled binary that does not exist. The dynamic path builder is evaluating node_os.arch()
to arm
, since I'm on 32-bit Linux. I see that only 64-bit precompiled binaries are provided.
Metadata
Metadata
Assignees
Type
Projects
Status
No status