Slowest operation appears in real-time metrics after creating database triggers

I recently created a database trigger that executes on insert operations on a particular collection. However, when I check the real-time metrics in my MongoDB Atlas dashboard, I noticed that the collection associated with the trigger is listed as the slowest operation with an “aggregate” action. The slowest operation has an execution time that starts at 999ms and decreases gradually.

I am confused as to why this is happening and whether it’s related to the trigger I created. Could someone please explain what might be causing this issue and how to resolve it?

1 Like

We also have the same concern. When we asked this question at one of the Dev summits (MongoDB Pune, India, May 23), they said it’s a bug and will be rectified soon.