Skip to content
This repository was archived by the owner on Jan 6, 2022. It is now read-only.

opentable/ot-hapi-statsd

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ot-hapi-statsd (Plugin)

CURRENT REQUIREMENTS


node >= 4

CODING STANDARDS

Don't use var. Use const where possible, let where not.

DESCRIPTION

Hapi.js Plugin for statsd.

This will track your - Count: incoming Request by path - Timing: response by path - Count: response by url and status code

STATSD

- For Ex' [GET] /users/all -> Response [200]
- onRequest
    - Count: increment `request.in.users.all'
- onPreResponse
    - Count increment `response.out.users.all.200`
    - Timer `request.users.all`

Build Status

Quick tour

//SERVER:

server.register([
    register: require('ot-hapi-statsd'),
    options: {
        host: 'statsd.localhost', // your statsd host
        prefix: 'node-app.development.local.', // Prefix
        port: 8125, //must be a number default 8125
        debug: true //could be true/false
        removePath: {
          number: 1, // MUST BE INTEGER
          regex: '/\[[0-9]+\]/' //when to remove part of the path when empty it will on all the routes
        }
    }
])...

Github

Check the GitHub issues.

LICENSE

LICENSE.

About

Hapi plugin for automatically making StatsD calls

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%