eventsd-metric

eventsd metric protocol module

Usage no npm install needed!

<script type="module">
  import eventsdMetric from 'https://cdn.skypack.dev/eventsd-metric';
</script>

README

eventsd-metric

A library for sending metrics with EventsD

Usage

    var Metric = require('eventsd-metric');

    var metric = new Metric();

    // Returns a promise
    metric.increment('my.metric', 1);

Methods

All methods of the Metric class return a promise.

Several convience methods are available for specifiing the type of aggregation that should be used for a metric.

Methods:

  • increment - simple counter
  • decrement - simple counter
  • min
  • max
  • mean
  • gauge - last value wins (and persists)
  • timing - track mean, standard deviation, min, max, and count
  • unique - count of unique values

Options

See EventsD options

Environment Variables

See EventsD environment variables

Run Tests

  npm test

====================

Author: Craig Thayer

License: ISC

See LICENSE for the full license text.