 prom = require('prom-client')
-Register = require('prom-client').register
+
 collectDefaultMetrics = prom.collectDefaultMetrics
 
 appname = "unknown"

require "./uv_threadpool_size"

module.exports = Metrics =
	initialize: (_name) ->
		appname = _name
		collectDefaultMetrics({ timeout: 5000, prefix: Metrics.buildPromKey()})


	injectMetricsRoute: (app) ->
		app.get('/metrics', (req, res) -> 
			res.set('Content-Type', register.contentType)
			res.end(register.metrics())
		)

	buildPromKey: (key = "")->
