Starting in MongoDB 4.4.2, you can set a filter to control which operations are logged by the profiler. 从MongoDB 4.4.2开始,您可以设置filter来控制探查器记录哪些操作。When set, any configured filters are also returned by db.getProfilingStatus(), along with a note explaining filter behavior.设置后,db.getProfilingStatus()也会返回任何配置的筛选器,并附带一条note解释筛选器行为。
You can set the profiling filter with either:您可以使用以下任一项设置分析筛选器: