-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
command events are not fired after setting monitorCommands: true #14611
Labels
enhancement
This issue is a user-facing general improvement that doesn't fix a bug or add a new feature
Milestone
Comments
Use the following instead: const client = mongoose.connection.client;
client.on('commandStarted', event => console.log(event));
client.on('commandFailed', event => console.log(event));
client.on('commandSucceeded', event => console.log(event));
That being said, we will keep this issue open for 8.5 because it would by nice for Mongoose to bubble up the |
vkarpov15
added
the
enhancement
This issue is a user-facing general improvement that doesn't fix a bug or add a new feature
label
May 24, 2024
Yeah |
vkarpov15
added a commit
that referenced
this issue
Jun 21, 2024
…tion if `monitorCommands` option set Fix #14611
vkarpov15
added a commit
that referenced
this issue
Jun 24, 2024
feat(connection): bubble up monitorCommands events to Mongoose connection if `monitorCommands` option set
This was referenced Jul 30, 2024
This was referenced Jul 30, 2024
This was referenced Sep 3, 2024
This was referenced Sep 4, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
enhancement
This issue is a user-facing general improvement that doesn't fix a bug or add a new feature
Prerequisites
Mongoose version
8.4.0
Node.js version
18.19.1
MongoDB server version
6.0.1
Typescript version (if applicable)
No response
Description
MongoDB dirver supports Command Monitoring
Problem: unable to subscribe for command monitoring events using mongoose
Steps to Reproduce
using
mongoose@8.4.0
After following setup steps from the doc above, events are not emitted / reaching event listeners
Expected Behavior
but when using
mongodb@6.6.2
directly which is installed together withmongoose@8.4.0
Events are fired and able to reach event listeners
The text was updated successfully, but these errors were encountered: