Przeglądaj źródła

remove logging and bump to 2.0.4

Henry Oswald 7 lat temu
rodzic
commit
752541b7f1

+ 0 - 3
libraries/metrics/metrics.coffee

@@ -60,7 +60,6 @@ module.exports = Metrics =
 				help: key, 
 				labelNames: ['app','host','status','method']
 			})
-		console.log("doing inc", key, opts)
 		opts.app = appname
 		opts.host = hostname
 		promMetrics[key].inc(opts)
@@ -86,13 +85,11 @@ module.exports = Metrics =
 				labelNames: ['app', 'path', 'status_code', 'method', 'collection', 'query']
 			})
 		opts.app = appname
-		console.log("doing timing", key, opts)
 		promMetrics[key].observe(opts, timeSpan)
 
 	Timer : class
 		constructor :(key, sampleRate = 1, opts)->
 			this.start = new Date()
-			console.log("creating new timer", key)
 			key = Metrics.sanitizeKey(key)
 			this.key = key
 			this.sampleRate = sampleRate

+ 1 - 1
libraries/metrics/package.json

@@ -1,6 +1,6 @@
 {
   "name": "metrics-sharelatex",
-  "version": "2.0.3",
+  "version": "2.0.4",
   "description": "A drop-in metrics and monitoring module for node.js apps",
   "repository": {
     "type": "git",

+ 0 - 4
libraries/metrics/timeAsyncMethod.coffee

@@ -16,7 +16,6 @@ module.exports = (obj, methodName, prefix, logger) ->
 		modifedMethodName = "#{splitPrefix[1]}_#{methodName}"
 	else
 		modifedMethodName = methodName
-	console.log "Async method", prefix, key, methodName, modifedMethodName
 	obj[methodName] = (originalArgs...) ->
 
 		[firstArgs..., callback] = originalArgs
@@ -26,9 +25,6 @@ module.exports = (obj, methodName, prefix, logger) ->
 				logger.log "[Metrics] expected wrapped method '#{methodName}' to be invoked with a callback"
 			return realMethod.apply this, originalArgs
 
-		console.log("creating timer for async method", prefix, startPrefix, modifedMethodName)
-
-
 		timer = new metrics.Timer(startPrefix, null, {method: modifedMethodName})
 
 		realMethod.call this, firstArgs..., (callbackArgs...) ->