Profiler should only watch queries from certain users
It would be useful to provide the profiler an "allowlist" and "denylist" of users to watch queries from. Essentially, it is only useful to receive alerts and profiler reports for queries made by actual applications. It is not useful to have alerts show up for one-off queries made by a DB admin using a DB explorer.
A specific example could include omitting any $sample queries executed by the MongoDB Agent user.
On large collections, the MongoDB Agent's $sample, when running schema design analysis, surface as slow queries in the Profiler. This could be unnecessary noise or raise concerns for operations that are expected to take a relatively considerable amount of time and are not affecting application performance.
Hi Karim - Thanks, that's a great idea. Couple of questions:
1. Do you specify the appname in the connection string today? (https://docs.mongodb.com/manual/reference/connection-string/) or are you asking for a way for us to say block queries from certain "internal apps", like DE?
2. Do you also think it's useful to get an email / sms alert sent to you whenever there are any queries exceeding some defined threshold? Is it a better alert than the current operation latency alert that we have?