gauges
TypeScript icon, indicating that this package has built-in type declarations

1.1.4 • Public • Published

Basic StatsD client

 
const g = require('gauges');
 
// configure connection
 
g.PORT = 8125;
h.HOST = 'localhost';
 
// single message
g.counter('ducks', 2);
 
// multi
const multi = g.multi('server');
 
multi
    .counter('request', 1)
    .counter('sessions', 2)
    .counter('queries', 6)
    .timer('delay', 200)
    .set('query', 'get_all_ducks')
    .set('query', 'get_all_cows');
    
multi.send();

API

Mirrors StatsD API. Reference

NOTE: all commands also send the corresponding UDP packet to StatsD

  • #counter(key, value)
  • #gauge(key, value)
  • #timer(key, value)
  • #set(key, value)

Multi

Sends multi-metric packets. Reference

  • gauges.multi(prefix)
  • #send() send the batch command

Readme

Keywords

none

Package Sidebar

Install

npm i gauges

Weekly Downloads

2

Version

1.1.4

License

ISC

Unpacked Size

12.6 kB

Total Files

8

Last publish

Collaborators

  • aliem