-
Notifications
You must be signed in to change notification settings - Fork 9
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
Error with fs.exists wrapper. #287
Comments
Here are the logs as requested by support: |
An extra note.
|
Try
https://github.com/appoptics/appoptics-apm-node/blob/master/lib/probe-defaults.js#L28 |
That worked! Thank you! By the way, here is a minimal reproduction of the error case:
Results in:
|
I am trying to use AppOptics in a nodejs project that uses the prisma library. I am also using esm imports, so I am instantiating AppOptics like so:
node -r appoptics-apm dist/src/main
The sequence of events that leads to the error:
function patchPathMethod (fs, method)
within this library wraps thefs.exists()
method.exists()
is simply a promisified version offs.exists()
exsits()
causes the boolean valuetrue
to be thrown instead of returned as it should be. The thrown boolean cascades into this error which crashes the application:After debugging it for a while, I believe that the problem stems from the fact that
patchPathMethod
withinnode_modules/appoptics-apm/lib/probes/fs.js
is not meant to overridesuppressedCallback
within the fs library.I believe the fs library has changed in different versions of node but mine looks like this (node version v16.17.0):
The text was updated successfully, but these errors were encountered: