srv/demo.js
function map (msg, done) {
    var metric = {
      source: msg.source,
      name: 'my-metric',
      values: {val: msg.payload.val},
      tags: {tag: msg.payload.tag}
    }

    done(null, [metric])
  }
function map (msg, done) {
    var metric = {
      source: msg.source,
      name: 'my-metric',
      values: {val: msg.payload.val},
      tags: {tag: msg.payload.tag}
    }

    done(null, [metric])
  }
function map ( msg , done ) { var metric = { source : msg . source , name : 'my-metric' , values : { val : msg . payload . val } , tags : { tag : msg . payload . tag } } done ( null , [ metric ] ) }
Map plugins return arrays of metrics. The only required fields are source and name. All other fields depend on the sink you want to use. Note that the fields below represent our 'plugin' standard.
Map plugins return arrays of metrics . The only required fields are source and name . All other fields depend on the sink you want to use . Note that the fields below represent our plugin standard .