Socket
Socket
Sign inDemoInstall

datadog-statsd-metrics-collector

Package Overview
Dependencies
2
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    datadog-statsd-metrics-collector

Collect, rollup, and batch Datadog statsd metrics


Version published
Weekly downloads
52
increased by26.83%
Maintainers
1
Install size
66.2 kB
Created
Weekly downloads
 

Readme

Source

datadog-statsd-metrics-collector

A wrapper for for node-dogstatsd that buffers and rolls up metrics into efficient calls to a Datadog StatsD server.

Install

npm install datadog-statsd-metrics-collector node-dogstatsd

Usage

const StatsD = require('node-dogstatsd').StatsD
const Collector = require('datadog-statsd-metrics-collector');

const dd = new Collector(new StatsD('example.org', 8125));
dd.increment('test.metric', 1, ['tag:first']);

Buffered stats

  • increment
  • incrementBy
  • decrement
  • decrementBy

TODO

  • histagram

API

Aside from the constructor all StatsD calls proxied to node-dogstatsd.

constructor(client, delayMilliseconds)

argtyperequireddefault
clientinstanceof node-dogstatsdyesundefined
delayMillisecondsnumberno10000

increment(metrics, sample_rate, tags)

argtyperequireddefault
metricstringyesundefined
sample_raten/an/an/a
tagsarray[string]noundefined

Note: sample rates are ignored as they serve no purpose when rolling up metrics.

incrementBy(metrics, value, tags)

argtyperequireddefault
metricstringyesundefined
valuenumberno1
tagsarray[string]noundefined

decrement(metrics, sample_rate, tags)

argtyperequireddefault
metricstringyesundefined
sample_raten/an/an/a
tagsarray[string]noundefined

Note: sample rates are ignored as they serve no purpose when rolling up metrics.

decrementBy(metrics, value, tags)

argtyperequireddefault
metricstringyesundefined
valuenumberno1
tagsarray[string]noundefined

timing(metric, time, sample_rate, tags)

argtyperequireddefault
metricstringyesundefined
timenumberyesundefined
sample_ratenumberno1
tagsarray[string]noundefined

gauge(metric, value, sample_rate, tags)

argtyperequireddefault
metricstringyesundefined
valuenumberyesundefined
sample_ratenumberno1
tagsarray[string]noundefined

histogram(metric, value, sample_rate, tags)

argtyperequireddefault
metricstringyesundefined
valuenumberyesundefined
sample_ratenumberno1
tagsarray[string]noundefined

set(metric, value, sample_rate, tags)

argtyperequireddefault
metricstringyesundefined
valuenumberyesundefined
sample_ratenumberno1
tagsarray[string]noundefined

Keywords

FAQs

Last updated on 31 Jan 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc