Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
chpr-metrics
Advanced tools
This utility library implements our standard statsd configuration
Minimum Node.js version: 4
## Installation
npm install --save chpr-metrics
This simple configuration allows you to send metrics to a single statds server
If you need to send metrics to several destinations, you can use the METRICS_DESTINATIONS variable, which allows you to specify a list of destinations as a JSON array:
Complete example:
[{
"METRICS_HOST": "host1.yourstats.com",
"METRICS_PORT": "1234",
"METRICS_PREFIX": "prefix1.",
"METRICS_SUFFIX": ".suffix1"
}, {
"METRICS_HOST": "your-other-host.com",
"METRICS_PORT": "44444",
"METRICS_PREFIX": "anotherPrefix.",
"METRICS_SUFFIX": ".anotherSuffix"
}]
If you use this in combination with the individual configuration variables listed in the previous sections, it will send metrics to all directions.
'use strict';
const metrics = require('chpr-metrics');
// Timing: sends a timing command with the specified milliseconds
metrics.timing('response_time', 42);
// Increment: Increments a stat by a value (default is 1)
metrics.increment('my_counter');
The exported object is the configured statds client: see https://github.com/sivy/node-statsd
FAQs
Chauffeur Privé's statsd configuration
The npm package chpr-metrics receives a total of 2 weekly downloads. As such, chpr-metrics popularity was classified as not popular.
We found that chpr-metrics demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.