index.js
function makePoint() {
      // Pull start time from req and log responseTime
      var responseTime = Date.now() - req.start;
      
      // Add the new point to the batch of points
      batch.points.push({
        measurement: "requests",
        "tags": {
          "path": req.path,
          "host": req.hostname,
          "verb": req.method,
          "status": res.statusCode,
        },
        "fields": {
          "responseTime": responseTime,
        },
      })
      
      // Emit the 'addPoint' event
      batch.emit("addPoint")
    }
function makePoint() {
      // Pull start time from req and log responseTime
      var responseTime = Date.now() - req.start;
      
      // Add the new point to the batch of points
      batch.points.push({
        measurement: "requests",
        "tags": {
          "path": req.path,
          "host": req.hostname,
          "verb": req.method,
          "status": res.statusCode,
        },
        "fields": {
          "responseTime": responseTime,
        },
      })
      
      // Emit the 'addPoint' event
      batch.emit("addPoint")
    }
function makePoint ( ) { // Pull start time from req and log responseTime var responseTime = Date . now ( ) - req . start ; // Add the new point to the batch of points batch . points . push ( { measurement : "requests" , "tags" : { "path" : req . path , "host" : req . hostname , "verb" : req . method , "status" : res . statusCode , } , "fields" : { "responseTime" : responseTime , } , } ) // Emit the 'addPoint' event batch . emit ( "addPoint" ) }
Make line protocol point and add to batcher
Make line protocol point and add to batcher