   @sanitizeMetricName : (string) ->
 
     return string
-      .replace /\/$/g,                 'home'  # replace last / with home
       .replace /[\/-]/g,               '.'     # replace all / with .
       .replace /\.{2,}/g,              '.'     # remove adjacent dots
       .replace /[^a-zA-Z0-9_\.]/g,     '_'     # replace invalid chars with _

      when req?.route?              then req.route.path
      else                               req.path

    @sanitizeMetricName "#{@prefix}.#{path}"




  @send : (req, res, next) =>

    start = new Date()

    onFinished res, =>
      metricName  = @generateName req
      tags        = @populateTags req, res
      elapsedTime = new Date() - start
      @sendMetrics @metricsOnFinished({ elapsedTime }), metricName, tags

    next()

