 buildKey = (key)-> "#{name}.#{hostname}.#{key}"
 buildGlobalKey = (key)-> "#{name}.global.#{key}"
 
+
+
 promMetrics = {}
 
 destructors = []

			res.set('Content-Type', Register.contentType)
			res.end(Register.metrics())
		)

	sanitizeKey: (key) ->
		key.replace /[^a-zA-Z0-9]/g, "_"


	gauge : (key, value, sampleRate = 1)->
		statsd.gauge buildKey(key), value, sampleRate
		key = Metrics.buildPromKey(key)
		if !promMetrics[key]
			promMetrics[key] = new prom.Gauge({
				name: key,
				help: key, 
				labelNames: ['name','host']
			})
