How to use the hot-shots function in hot-shots

To help you get started, we’ve selected a few hot-shots examples, based on popular ways it is used in public projects.

github algolia / npm-search / src / datadog.js View on Github external
import StatsD from 'hot-shots';
import log from './log.js';

const env = process.env.NODE_ENV === 'production' ? 'prod' : 'dev';

const client = new StatsD({
  host: process.env.DOGSTATSD_HOST || 'localhost',
  port: 8125,
  prefix: 'alg.npmsearch.',
  globalTags: {
  errorHandler(error) {
    log.error('[DATADOG ERROR]', error);

export default client;
github artsy / metaphysics / src / lib / stats.js View on Github external

  const statsClient = new StatsD({
    host: STATSD_HOST,
    port: STATSD_PORT,
    globalTags: { service: DD_TRACER_SERVICE_NAME, pod_name: os.hostname() },
    mock: !isProd,
    errorHandler: function(err) {
      error(`Statsd client error ${err}`)

  if (enableMetrics && isProd) {
    const appmetrics = require("appmetrics")
      mqtt: "off",
    const monitoring = appmetrics.monitor()
    _.forEach(appMetricsDisable, (val, idx) => {


Node.js client for StatsD, DogStatsD, and Telegraf

Latest version published 2 months ago

Package Health Score

83 / 100
Full package analysis

Similar packages