Wavefront reporters for metrics
A node.js Wavefront reporters for metrics.
Installation
$ npm install wavefrontmetrics
Usage
Wavefront Reporters
const metrics = ;const registry = ; // Report directly to a Wavefront serverconst directReporter = registry "wavefront.nodejs.direct" "<cluster>.wavefront.com" "<wavefront_api_token>" "tag0": "default" "source": "wavefront-nodejs-example";directReporterstart5000; // Report to a Wavefront proxyconst proxyReporter = registry "wavefront.nodejs.proxy" "localhost" 2878 "tag0": "default" "source": "wavefront-nodejs-example";proxyReporterstart5000;
Metrics
const metrics = ;const registry = ; // Counter with metric level tagslet c = ;registry;c; // Gauge with metric level tags// Note that you can only pass in a function to a Gauge.var g = { return 2 + Math;};registry; // Histogramlet h = ;registry;h; // Meterlet m = ;registry;m; // Timerlet t = ;registry;t;
DeltaCounter
const metrics = ;const registry = ; let deltaCounter = ;let deltaName = metrics;registry;deltaCounter;