-
-
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
Auto-instrumenting Mongoose@8 fails #13672
Comments
@onurtemizkan could you have a look at this? |
Affected me as well. Node v22.8.0 in ubuntu 24.04. AWS ARM64 machine |
Thanks for the extra info, we're still looking into this. |
Hi all! It looks like the root of this issue is fixed on |
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/node
SDK Version
8.30.0
Framework Version
Node.js v22.1.0
macOS 14.6.1
Link to Sentry event
No response
Reproduction Example/SDK Setup
Reproduction repo at https://github.com/SteffenLanger/reproduce-mongoose-integration-sentry-bug
package.json
instrument.js
index.js
Steps to Reproduce
Start the index.js script:
node --import=./instrument.js index.js
Expected Result
The script should run without errors.
Actual Result
An error is thrown and the script exits.
The issue seems to lie in Sentry's dependency
@opentelemetry/instrumentation-mongoose
atnode_modules/@opentelemetry/instrumentation-mongoose/build/src/mongoose.js:94:44)
. It tries to monkey patchmongoose.Aggregate
butAggregate
does not exist on Mongoose (anymore?).This is the opentelemetry code (see "
<-- ISSUE LIES HERE
"):The text was updated successfully, but these errors were encountered: