@shopify/statsd
An opinionated StatsD client for Shopify Node.js servers and other StatsD utilities
Last updated 2 months ago by shopify-dep .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @shopify/statsd 
SYNC missed versions from official npm registry.

@shopify/statsd

Build Status License: MIT npm version

An opinionated StatsD client for Shopify Node.js servers and other StatsD utilities.

Installation

$ yarn add @shopify/statsd

Usage

Client

Create a StatsD client with the following:

import {StatsDClient} from '@shopify/statsd';

const statsdClient = new StatsDClient({
  host: 'some-statsd-host.com',
  port: '8125',
  prefix: 'AppName',
});

distribution

Tracks the statistical distribution of a set of values across your infrastructure.

statsdClient.distribution(
  'navigationComplete',
  100, // in milliseconds
  ['navigation', 'complete', 'performance'], // user-defined tags to go with the data
);

increment

Increments a stat by 1.

statsdClient.increment(
  'myCounter',
  ['navigation', 'complete', 'performance'], // user-defined tags to go with the data
);

close

Close statsd client. This will ensure all stats are sent and stop statsd from doing anything more.

statsdClient.close();

Current Tags

  • 1.2.4                                ...           latest (2 months ago)
  • 1.0.0-sknext-beta.2                                ...           next (2 days ago)

16 Versions

  • 1.0.0-sknext-beta.2                                ...           2 days ago
  • 1.0.0-sknext-beta.1                                ...           6 days ago
  • 1.2.4-sknext-beta.9                                ...           6 days ago
  • 0.0.8-sknext-beta.8                                ...           7 days ago
  • 0.0.2-sknext-beta.2                                ...           12 days ago
  • 0.0.1-sknext-beta.1                                ...           13 days ago
  • 1.2.4                                ...           2 months ago
  • 1.2.3                                ...           4 months ago
  • 1.2.2                                ...           6 months ago
  • 1.2.1                                ...           7 months ago
  • 1.2.0                                ...           7 months ago
  • 1.1.2                                ...           9 months ago
  • 1.1.1                                ...           9 months ago
  • 1.1.0                                ...           10 months ago
  • 1.0.1                                ...           10 months ago
  • 1.0.0                                ...           10 months ago

Copyright 2014 - 2016 © taobao.org |