cnn-metrics
Version:
52 lines (29 loc) • 1.44 kB
Markdown
# CNN Metrics
[](https://travis-ci.org/cnnlabs/cnn-metrics)

[](https://www.npmjs.com/package/cnn-metrics)
[](https://www.npmjs.com/package/cnn-metrics)
[](https://gemnasium.com/cnnlabs/cnn-metrics)
## Requirements
A current LTS or Stable version of [Node.js](https://nodejs.org). We recommend
using [nvm](https://github.com/creationix/nvm#readme) to manage node versions.
## Installation
```shell
$ npm install
```
## Usage
See the [`example/`](./example) directory. You can start up the example app
with the following. Supply your own [Hosted Graphite](https://www.hostedgraphite.com)
key or [DataDog](https://datadog.com) keys.
```shell
$ NODE_ENV=production ENABLE_MTERICS=true HOSTEDGRAPHITE_APIKEY=[valid-key] DEBUG=* DEBUGMETRICS=1 PORT=5000 node example/app.js
```
## Environment variables
This package requires a few environment variable to be set.
- `NODE_ENV`
- `ENVIRONMENT`
- `METRICS_ENABLED`
- `HOSTEDGRAPHITE_APIKEY` -or- `DATADOG_APIKEY` and `DATADOG_APPKEY`
- `NODE_APP_INSTANCE`
- `METRICS_INTERVAL`
- `DEBUGMETRICS`