# jambonz-stats-collector

> report metrics from jambonz servers

Latest version **0.0.3** (published 2020-02-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install jambonz-stats-collector
pnpm add jambonz-stats-collector
yarn add jambonz-stats-collector
bun add jambonz-stats-collector
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2020-02-19 |
| First published | 2020-02-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 6.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Dave Horton |
| Maintainers | beachdog |

## Links

- npm: https://www.npmjs.com/package/jambonz-stats-collector
- Repository: https://github.com/jambonz/jambonz-rtpengine-utils
- Homepage: https://github.com/jambonz/jambonz-rtpengine-utils#readme
- Issues: https://github.com/jambonz/jambonz-rtpengine-utils/issues
- npm.io page: https://npm.io/package/jambonz-stats-collector

## Dependencies (2)

- [debug](https://npm.io/package/debug.md) ^4.1.1
- [hot-shots](https://npm.io/package/hot-shots.md) ^6.8.7

## Recent versions

- 0.0.3 (latest) — 2020-02-19
- 0.0.1 — 2020-02-18

## README

# jambonz-stats-collector

Utility class for sending metrics.  Currently supports only Datadog as metrics collector.

## usage
The following environment variables are used:

- `ENABLE_DATADOG_METRICS` set to a value of 1 to enable sending metrics to Datadog; this package will do nothing if this env var is not set
- `DATADOG_PREFIX` optional prefix to apply to Datadog stats
```
const StatsCollector = require('jambonz-stats-collector');
const stats = new StatsCollector(logger); // optionally, pass a pino logger
stats.gauge('sbc.calls.count', 10);
stats.increment('mycounter');
stats.decrement('mycounter');
```

---
_Source: https://npm.io/package/jambonz-stats-collector · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
