Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Fetching latest commit…

Cannot retrieve the latest commit at this time

..
Failed to load latest commit information.
test
.gitignore
README.md
index.js
package.json

README.md

statsd-singly

A node.js library for communicating with statsd over UDP. Provides mocha unit tests.

Examples

var statsd = require('statsd-singly').StatsD('localhost', 8125);

// Gauges
statsd.gauge({ users: 35 }).send();

// Multiple gauges
statsd.gauge({ users: 35, guests: 48 }).send();

// Any measurement can also specify a sample rate
statsd.gauge({ users: 35 }).sample(0.5).send();

// Timings (in milliseconds)
statsd.timing({ page-load: 74 }).send();

// Incrementing multiple counters
statsd.increment(['logins', 'errors']).send();

// Decrementing a counter
statsd.decrement('logins').send();

// Modifying a counter by more than +1 or -1
statsd.modify({ errors: 5 }).send();

// Modifying multiple counters
statsd.modify({ errors: 5, syntaxErrors: 2 }).send();
Something went wrong with that request. Please try again.