New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

chpr-metrics

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chpr-metrics

Chauffeur Privé's statsd configuration

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

This utility library implements our standard statsd configuration

Requirements

Minimum Node.js version: 4

## Installation

npm install --save chpr-metrics

Configuration

  • METRICS_HOST
  • METRICS_PORT
  • METRICS_PREFIX (prepended to all metrics name)
  • METRICS_SUFFIX (appended to all metrics name)
  • METRICS_CACHE_DNS (set to "true" to activate caching, any other values disables dns caching)

Use

'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

Keywords

FAQs

Package last updated on 18 May 2016

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc