Explorar el Código

update to new metrics api

Shane Kilkelly hace 9 años
padre
commit
c6dd68a3e6
Se han modificado 1 ficheros con 5 adiciones y 11 borrados
  1. 5 11
      services/contacts/app/coffee/ContactManager.coffee

+ 5 - 11
services/contacts/app/coffee/ContactManager.coffee

@@ -31,14 +31,8 @@ module.exports = ContactManager =
 			return callback(error) if error?
 			return callback(error) if error?
 			callback null, user?.contacts
 			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)