@sandjs/metric

Metrics Inteface to metric services

Usage no npm install needed!

<script type="module">
  import sandjsMetric from 'https://cdn.skypack.dev/@sandjs/metric';
</script>

README

sand-metric

A Sand Grain for connecting to your metric library and standardizing events to send

Usage

sand.metric.increment('my.metric');

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

Metric Libraries

The only tested libraries: