       text             : "VM start failed for user: %nickname%"
       notify           : "@slack-alerts"
       tags             : ["user:%nickname%", "context:vms"]
-
-
-  Metrics      =
-    KloudInfo  :
-      metric   : "kloud.info.gauge"
-      tags     : ["user:%nickname%"]
-    KlientInfo :
-      metric   : "klient.info.gauge"
-      tags     : ["user:%nickname%"]
 
 
   tagReplace = (sourceTag, nickname)->

    sharedMethods      :
      static           :
        sendEvent      : (signature Object, Function)
        increment      : (signature String, Function)


  {api_key, app_key}   = KONFIG.datadog

      callback err


  @sendMetrics = secure (client, _metrics, callback = ->)->

    { connection: { delegate } } = client

    unless delegate.type is 'registered'
      return callback new KodingError "Not allowed"

    if not _metrics or _metrics.length is 0
      return callback new KodingError "Metrics required."

    {nickname} = delegate.profile
    metrics    = []
    userTag    = "user:#{nickname}"
    now        = Date.now()/1000

    for metric in _metrics

      # From client side we are sending array of following:
      #
      # eg. "kloud.info:failed:3" -> kloud.info method failed 3 times
      #

      [metric, state, points] = metric.split ':'

      unless metric or state or points?
        return callback new KodingError "Corrupted metrics"

      metric = "client.#{metric}"
      tags   = [userTag, "state:#{state}"]
      points = [[now, points]]

      metrics.push { metric, tags, points }

    DogApi.add_metrics series: metrics, (err)->

      if err?
        console.error "[DataDog] Failed to create event:", err
