srv/demo.js
function sink (msg, done) {
    var metric = msg.metric
    var as_text = JSON.stringify(metric, null, 1)

    console.log(as_text)

    done()
  }
function sink (msg, done) {
    var metric = msg.metric
    var as_text = JSON.stringify(metric, null, 1)

    console.log(as_text)

    done()
  }
function sink ( msg , done ) { var metric = msg . metric var as_text = JSON . stringify ( metric , null , 1 ) console . log ( as_text ) done ( ) }
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.
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 .