code: function sink (msg, done) {
      var metric = msg.metric
      var as_text = JSON.stringify(metric, null, 1)
  
      console.log(as_text)
  
      done()
    }
docs: A sink simply does something with each metric it gets. In our case we are logging to the console but you can do anything you like with it.