update to new metrics api

This commit is contained in:
Shane Kilkelly 2017-03-17 15:30:38 +00:00
parent 64fc6ef2e3
commit c6dd68a3e6

View file

@ -31,14 +31,8 @@ module.exports = ContactManager =
return callback(error) if error?
callback null, user?.contacts
metrics.timeAsyncMethod(
ContactManager, 'touchContact',
'ContactManager.touchContact',
logger
)
metrics.timeAsyncMethod(
ContactManager, 'getContacts',
'ContactManager.getContacts',
logger
)
[
'touchContact',
'getContacts',
].map (method) ->
metrics.timeAsyncMethod(ContactManager, method, 'mongo.ContactManager', logger)