Socket
Socket
Sign inDemoInstall

ah-datadog-plugin

Package Overview
Dependencies
12
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ah-datadog-plugin

## Install


Version published
Weekly downloads
6
increased by500%
Maintainers
1
Install size
6.45 MB
Created
Weekly downloads
 

Readme

Source

AH-DATADOG-PLUGIN

Install

  • npm install ah-datadog-plugin
  • ./node_modules/.bin/actionhero link --name ah-datadog-plugin

We use the awesome datadog-metrics package. Note: while we might be instructing the package to send data very often, it will actually buffer the data and send it in batches. A datadog-agent is not required, we talk directly to the datadog API!

Requirements

  • Ensure that DATADOG_API_KEY is set in your Environment (this is the only config)

Data

All metrics are prefixed automatically by appName and host where:

let appName = api.config.general.serverName.replace(/\s/g, '-') + '-' + api.env;
let host = api.id.replace(/\s/g, '-');

Memory

We will report the following every 5 seconds:

var memUsage = process.memoryUsage();
datadog.gauge('memory.rss', memUsage.rss);
datadog.gauge('memory.heapTotal', memUsage.heapTotal);
datadog.gauge('memory.heapUsed', memUsage.heapUsed);

Resque:

We will report the following (queue lengths) every 5 seconds from resque/Tasks

datadog.histogram(`resque.${q}.length`, length); // 'q' is the name of the queue
datadog.histogram(`resque._all.length`, total);

Actions

We will report the following at the end of every action

datadog.histogram('actions._all.duration', duration);
datadog.histogram(`actions.${data.params.action}.duration`, duration);

We will report the following every minute

datadog.gauge('actions.per_minute', actionCounter);

Tasks

We will report the following at the end of every task

datadog.histogram('tasks._all.duration', duration);
datadog.histogram(`tasks.${worker.job.class}.duration`, duration);

We will report the following every minute

datadog.gauge('tasks.per_minute', actionCounter);

FAQs

Last updated on 14 Nov 2016

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc