-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Sentry Node.js ESM + OTEL instrumentation blockers - Part 2 #12485
Comments
The above PRs have been merged and we're just waiting for these changes to make it through all the required release processes. Until then I've made a patch which can be used with |
@timfish these warns are polluting the local env logs when booting up the apps, it'd be nice if they can be hidden via a debug env variable edit: warn message spammed on app startup example Error: 'import-in-the-middle' failed to wrap 'file:///path-to-app/src/services/index.ts'
at load (/path-to-monorepo/node_modules/.pnpm/[email protected]_patch_hash=yuhjsw3albhdp7qjccbkymjzsy/node_modules/import-in-the-middle/hook.js:306:21)
at async nextLoad (node:internal/modules/esm/hooks:866:22)
at async Hooks.load (node:internal/modules/esm/hooks:449:20)
at async handleMessage (node:internal/modules/esm/worker:196:18) {
cause: [Error: ENOENT: no such file or directory, open 'path-to-app/src/services/person.service.js'] {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: 'path-to-app/src/services/person.service.js'
}
} |
Hey! |
Hello! I have this issue on my side : It seems to be greatly related to the issues seen here. However, I could not find one that looks like mine. I'm using Sentry 8.13.0 I'm copying the test for further research :
This issue only comes since the installation of Sentry, when the app is built (using Remix with Vite). Have you any idea? |
Hi @MeCapron, This looks like a different issue and is very strange since all this code is CommonJs! Could you open a new issue with a minimal reproduction so I can debug what's going on? |
With the newest release of If you upgrade to a fresh install of the latest version of the Node SDK it should use There are some follow up issues though - I'll create a new ESM blockers issue (Part 3 😅) that we can use to track this! We need to:
|
Follow up issue: #12806 |
With the release of v8 of the Sentry SDK, the Node SDK now relies on OpenTelemetry. OpenTelemetry instrumentation does have some problems though (particularly with ESM because of import-in-the-middle), so this issue aims at documented these gaps.
Part 1: #12242
With
8.8.0
we released all the fixes for Part 1, but there are a new set of bugs for us to release fixes for. This is tracked in this issue.import-in-the-middle PRs to be merged
Hook
missing from types DataDog/import-in-the-middle#92parentResolve
is not a function DataDog/import-in-the-middle#100export *
DataDog/import-in-the-middle#103parentLoad
if parsing fails DataDog/import-in-the-middle#104parentLoad
DataDog/import-in-the-middle#106require('.')
resolution nodejs/import-in-the-middle#108process.emitWarning
to log errors nodejs/import-in-the-middle#114Sentry issues
--import ./instrument.mjs
andtsx
fails #12357.
inexports
property of CJS file breaks dynamic imports #126221. Issue with
prisma
libraryIssue: #12325
Repro: #12325 (comment)
IITM issue: nodejs/import-in-the-middle#95
Fix: #12325
2. using
--import ./instrument.mjs
andtsx
failsIssue: #12357
TSX issue: privatenumber/tsx#571
3. Issue with
openai
libraryIssue: #12414
Repro: NatoBoram/bug-report-sentry#9
IITM issue: nodejs/import-in-the-middle#102
Fix: nodejs/import-in-the-middle#103
4.
import-in-the-middle
does not support import attributesIssue: #12422
IITM issue: nodejs/import-in-the-middle#105
Fix: nodejs/import-in-the-middle#104
5. Does not work with
ts-node
Issue: #12480
Crashes with Nuxt + Nitro
Error: The requested module 'vue' does not provide an export named 'computed'
Issue: #12490
The text was updated successfully, but these errors were encountered: