mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
update to new metrics api
This commit is contained in:
parent
e879f9c742
commit
bc37c844ea
1 changed files with 10 additions and 35 deletions
|
@ -72,38 +72,13 @@ module.exports = MongoManager =
|
|||
}, callback
|
||||
|
||||
|
||||
metrics.timeAsyncMethod(
|
||||
MongoManager, 'findDoc',
|
||||
'MongoManager.findDoc',
|
||||
logger
|
||||
)
|
||||
metrics.timeAsyncMethod(
|
||||
MongoManager, 'getProjectsDocs',
|
||||
'MongoManager.getProjectsDocs',
|
||||
logger
|
||||
)
|
||||
metrics.timeAsyncMethod(
|
||||
MongoManager, 'getArchivedProjectDocs',
|
||||
'MongoManager.getArchivedProjectDocs',
|
||||
logger
|
||||
)
|
||||
metrics.timeAsyncMethod(
|
||||
MongoManager, 'upsertIntoDocCollection',
|
||||
'MongoManager.upsertIntoDocCollection',
|
||||
logger
|
||||
)
|
||||
metrics.timeAsyncMethod(
|
||||
MongoManager, 'markDocAsArchived',
|
||||
'MongoManager.markDocAsArchived',
|
||||
logger
|
||||
)
|
||||
metrics.timeAsyncMethod(
|
||||
MongoManager, 'getDocVersion',
|
||||
'MongoManager.getDocVersion',
|
||||
logger
|
||||
)
|
||||
metrics.timeAsyncMethod(
|
||||
MongoManager, 'setDocVersion',
|
||||
'MongoManager.setDocVersion',
|
||||
logger
|
||||
)
|
||||
[
|
||||
'findDoc',
|
||||
'getProjectsDocs',
|
||||
'getArchivedProjectDocs',
|
||||
'upsertIntoDocCollection',
|
||||
'markDocAsArchived',
|
||||
'getDocVersion',
|
||||
'setDocVersion'
|
||||
].map (method) ->
|
||||
metrics.timeAsyncMethod(MongoManager, method, 'mongo.MongoManager', logger)
|
||||
|
|
Loading…
Reference in a new issue