npm package: @fiverr/statsd-client
Description: 📈 A feature packed, highly customisable StatsD client
Author: Fiverr SRE
Latest version: 1.1.2

# @fiverr/statsd-client [![](https://img.shields.io/npm/v/@fiverr/statsd-client.svg?logo=npm)](https://www.npmjs.com/package/@fiverr/statsd-client) [![](https://img.shields.io/badge/source--000000.svg?logo=github&style=social)](https://github.com/fiverr/node-statsd-client) [![](https://circleci.com/gh/fiverr/node-statsd-client.svg?style=svg)](https://circleci.com/gh/fiverr/workflows/node-statsd-client) [![](https://img.shields.io/badge/documentation--000000.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAGlUlEQVR4Ae1XA5Q73w5Osd66XdTccmetWn/btm3btm3bNta7z7ZtF3m5OXPevNOf9xn3nG/unVzkS26SaWEDm4qgIWjlXi1Do8j5XQV/56ZhbFjT/j2IqBly0407LFro2JhwahMY7mwB49MtYHq+GQyPaEF3pQZa922GzjgBZMhEVtSUjU2gn7CB424jOL5n2z6ArjMl9N88hsF7JjB07yQG75xA7+XDaD88hsZh9x9bwTxNe46w7h/WERRDNtDlABubXZ3Q9XAwEUe4xIWeFydQmi7VpKVyZWCZsFSuCvCYIM2XqvF38hh6cAp79o9gG1i/1gTGvQggsD7XqFKYtm3vBP/PvGdICK9AfZfPHVLZ9JO71kLTGSJRxP6PGzAtY75YJzJVaa5UCT0wiZacD1vB9Jjt3HgnYe0kFOUtxwR9ZPXdvQhLI3964Uev1b/2u2/joZ86CVs/GsDhmY2xf6a4esjkxFhaLtcS7+Yr9iPj5A3LUsduvm7CGknIwpaj+kb6EZ4y1g/+8gnVL/326zj/i0/iHp84DLs/HsehmY348PXCxwWka8H+udIfnScnsB3Mn9Yf4DQTZGMblGtBv4nXEkZ40oqHfemk2vf+8EO8+5sPI3wIaPpoGIenN8LEdGHdiqdZueKNuSImPir8sffgCFKAvkwAgnzl8sOwu9tkAfs37XcN4vCnNq9++3ffx1u/fi/Ce4Dp2S1xZHETpODD/llWsDblbD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wasrrFcUi98OUJeEnp8QVVPw3jIjvwS/bJLMT6CH4qygnn+nZM4zhJ5Ki2FTIE1XaLDxSZ3xYQIH4B3l2pRzRotaznJXRHKUZyXMcbNE3MvXIy+l6+PlkjayuUBD/yXf1MBoDTuH+vQnKryB4J68VH4hO6Pl9z75h9F46iCJQQvdPYN9jU/Q1JDw5VQ8T+gSeoDG5M/xUEmlM8yxj8PjRSex7eBJD903wOZ6LB7F75xAFXtd328C2C0HR/dcDfdQWagbTqe1geZXc9GWDx/kL06irYk570JL3oqXkQ0aRkKP3LEHI6V2ZE3IPmsZdFYPX8QsqOF8iDz/XBIZDdSWHhcA61/SvR2lb2dvbwOxqhs4YbR7Vgi5JSGvBRNCl5PcpuRfvaRlJsb4ZzDGxH3ZythFAxnr9MNVy//dt6pX8W1LxRgWa9UXDPhX8u7b/tz8D8cXRYG6py3MAAAAASUVORK5CYII=&style=social)](https://fiverr.github.io/node-statsd-client)

## 📈 A feature packed, highly customisable StatsD client

> [See full documentation](https://fiverr.github.io/node-statsd-client)

### Get started quickly
```js
const SDC = require('@fiverr/statsd-client');

const stats = new SDC({host: '127.0.0.1', port: '8125'});
stats.count('my_application_name.visit_count'); // 31 (pending bulk size)
```

### Out-of-the box features and customisations

| | Features
| - | -
| 🛍 | StatsD metric types: `count`, `time`, `gauge`, `set`, `histogram`
| 🎩 | Instance sticky prefix (optional)
| 🔧 | Custom schemes support
| 🎁 | Preconfigured schemes: [DataDog](https://docs.datadoghq.com/tagging/#defining-tags), [Graphite](https://grafana.com/blog/2018/01/11/graphite-1.1-teaching-an-old-dog-new-tricks/) ([Carbon tags 🎉](https://graphite.readthedocs.io/en/latest/tags.html#carbon))
| 🏷 | Instance tags - pre-set tags for an instance or set tags when sending
| 🔮 | Sampling (sample rate)
| 🕸 | Protocols: `UDP`, `TCP`
| 🌎 | Protocol versions: `ipv4`, `ipv6`
| ⏲ | Custom flush period (Cutoff time for packets allows controlled traffic)
| 📦 | Custom MTU limit (maximum transmission unit)
| 🚨 | Error handling
| 🎈 | And then some