For people facing same issue with mongoose, I faced the similar issue with mongoose in my project.
What fixed issue with me is by adding
Making change in package.json
- “@opentelemetry/instrumentation-mongodb”: “^0.53.0”,
- adding overrides for mongoose
“overrides”: {
“mongoose”: {
“mongodb”: “6.5.0”
}
}