How to watch Meteor's interactions with MongoDB?



My problem: a single Collection.update() is causing 5-7 queries to MongoDB

I discovered this by chance, because I have turned on System Profiling locally:

$ meteor mongo

MongoDB shell version: 3.2.15
connecting to:

meteor:PRIMARY> db.setProfilingLevel(2)
{ “was” : 0, “slowms” : 100, “ok” : 1 }

My code looks something like this:

          _id: documentId,
          $addToSet: {
            likedBy: this.userId,

This results in 7 queries: 1 updateObj query, and 7 read queries.

If I use, then 2 of the read queries disappear.

I have a couple of theories for as to who’s generating the reads, but would be nice to have tracking tool.

Is there anything in Meteor that would allow me to pinpoint exactly where any kind of query is coming from?