 require "./uv_threadpool_size"
 
 
-traceAgent = require('@google-cloud/trace-agent')
-debugAgent = require('@google-cloud/debug-agent')
-
-.start({
-  serviceContext: {
-	allowExpressions: true,
-	service: 'filestore-readonly',
-	version: '0.0.1'
-  }
-});
 
 module.exports = Metrics =
 	initialize: (_name) ->
 		name = _name
-		collectDefaultMetrics({ timeout: 5000, prefix: name })
 		traceAgent.start()
 		debugAgent.start({
 			serviceContext: {

StatsD = require('lynx')
statsd = new StatsD(process.env["STATSD_HOST"] or "localhost", 8125, {on_error:->})

prom = require('prom-client')
collectDefaultMetrics = client.collectDefaultMetrics

name = "unknown"
hostname = require('os').hostname()


	inc : (key, sampleRate = 1)->
		statsd.increment buildKey(key), sampleRate

	count : (key, count, sampleRate = 1)->
		statsd.count buildKey(key), count, sampleRate

	timing: (key, timeSpan, sampleRate)->
		statsd.timing(buildKey(key), timeSpan, sampleRate)
