mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Ignore all queries
This commit is contained in:
parent
00c12ccab6
commit
125790b604
1 changed files with 4 additions and 3 deletions
|
@ -15,8 +15,9 @@ module.exports =
|
||||||
options = {}
|
options = {}
|
||||||
callback = () ->
|
callback = () ->
|
||||||
|
|
||||||
if db_command.query? and (db_command.query["ping"] or db_command.query["ismaster"])
|
collection = db_command.collectionName
|
||||||
# Ignore noisy methods
|
if collection.match(/\$cmd$/)
|
||||||
|
# Ignore noisy command methods like authenticating, ismaster and ping
|
||||||
return _method.call this, db_command, options, callback
|
return _method.call this, db_command, options, callback
|
||||||
|
|
||||||
key = "mongo-requests.#{type}"
|
key = "mongo-requests.#{type}"
|
||||||
|
@ -32,7 +33,7 @@ module.exports =
|
||||||
logger.log
|
logger.log
|
||||||
query: db_command.query
|
query: db_command.query
|
||||||
type: type
|
type: type
|
||||||
collection: db_command.collectionName
|
collection: collection
|
||||||
"response-time": new Date() - start
|
"response-time": new Date() - start
|
||||||
"mongo request"
|
"mongo request"
|
||||||
callback.apply this, arguments
|
callback.apply this, arguments
|
||||||
|
|
Loading…
Reference in a new issue