From c6dd68a3e6b7215a50fba37caa0ee50831115ae4 Mon Sep 17 00:00:00 2001 From: Shane Kilkelly Date: Fri, 17 Mar 2017 15:30:38 +0000 Subject: [PATCH] update to new metrics api --- .../contacts/app/coffee/ContactManager.coffee | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/services/contacts/app/coffee/ContactManager.coffee b/services/contacts/app/coffee/ContactManager.coffee index 79e9d79196..c39ba200f7 100644 --- a/services/contacts/app/coffee/ContactManager.coffee +++ b/services/contacts/app/coffee/ContactManager.coffee @@ -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)