dotcypress / micro-stats

πŸ“Š Tiny statsd helper

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NPM Version node Build Status js-standard-style

micro-stats

πŸ“Š Tiny statsd helper

Installation

Install from NPM:

$ npm install micro-stats --save

Examples

const track = require('micro-stats')

module.exports = track(function (req, res) {
  req.end(200)
})

module.exports = track(options, function (req, res) {
  req.end(200)
})

Options

  • host - optional statsd host [process.env.STATSD_HOST]
  • port - optional statsd port [process.env.STATSD_PORT]
  • prefix - optional statsd prefix ('.' is appended) [process.env.STATSD_PREFIX]
  • tcp - use TCP instead of UDP

About

πŸ“Š Tiny statsd helper

License:MIT License


Languages

Language:JavaScript 100.0%