From 52d3804596a502efc4867af1451904c646d81193 Mon Sep 17 00:00:00 2001 From: Sebastian Arena Date: Thu, 29 Nov 2018 15:51:17 -0300 Subject: [PATCH] Added extra information when profiling mongodb Very useful comes in the second parameter, such as sort, limit and projection --- probes/mongo-probe.js | 1 + 1 file changed, 1 insertion(+) diff --git a/probes/mongo-probe.js b/probes/mongo-probe.js index 559df269..b9bd7e14 100644 --- a/probes/mongo-probe.js +++ b/probes/mongo-probe.js @@ -175,6 +175,7 @@ MongoProbe.prototype.metricsEnd = function(probeData, collectionName, method, me am.emit('mongo', { time: probeData.timer.startTimeMillis, query: JSON.stringify(methodArgs[0]), + extra: methodArgs[1] && typeof methodArgs[1] === 'object' && JSON.stringify(methodArgs[1]), duration: probeData.timer.timeDelta, method: method, collection: collectionName,