-
-
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
"operation-start" event of the MongooseConnection #14648
Labels
docs
This issue is due to a mistake or omission in the mongoosejs.com documentation
enhancement
This issue is a user-facing general improvement that doesn't fix a bug or add a new feature
Milestone
Comments
vkarpov15
added
docs
This issue is due to a mistake or omission in the mongoosejs.com documentation
enhancement
This issue is a user-facing general improvement that doesn't fix a bug or add a new feature
labels
Jun 3, 2024
vkarpov15
added a commit
that referenced
this issue
Jun 13, 2024
fix(connection): fix up some inconsistencies in operation-end event and add to docs
This was referenced Jul 8, 2024
This was referenced Jul 9, 2024
This was referenced Aug 5, 2024
This was referenced Aug 15, 2024
This was referenced Aug 18, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
docs
This issue is due to a mistake or omission in the mongoosejs.com documentation
enhancement
This issue is a user-facing general improvement that doesn't fix a bug or add a new feature
Discussed in #14607
Originally posted by koresar May 20, 2024
We needed to add
comment
to each mongodb command. This helps debugging all performance bottlenecks.async_hooks
to set a context string (request ID) when a HTTP request comes.options.comment = stringContext;
Here is the code:
Since we were able to instrument each individual DB command, we found these 7 lines of code to be extraordinary helpful in solving a lot of complex issues. I just open Atlas -> Monitoring -> Query Insights -> click on the slow performing query -> "comment" value.
AMAZING!
However, there is no any documentation about the `operation-start" event. I assume it's on purpose.
I suggest making this part of the Mongoose API.
The text was updated successfully, but these errors were encountered: