-
Couldn't load subscription status.
- Fork 617
Description
opentelemetry-js-contrib/plugins/node/instrumentation-mongoose/src/mongoose.ts
Lines 137 to 141 in 0fc1ed3
| this._wrap( | |
| moduleExports.Aggregate.prototype, | |
| 'exec', | |
| this.patchAggregateExec(moduleVersion) | |
| ); |
Mongoose v7 does not appear to export .Aggregate which results in Cannot read properties of undefined (reading 'prototype').
The documentation states:
Supported Versions
mongoose versions >=5.9.7 <9
If this is intended to be the case, then wrapping of Aggregate will need to be optional or version dependent similar to instrumentRemove.
Would be happy to provide a patch if you agree this is the case, but might need to wait a few days as I first have to patch this internally somehow for our Sentry integration.