Connect your Node.js applications to Datadog to:
The Node.js integration enables you to monitor a custom metric by instrumenting a few lines of code. For instance, you can have a metric that returns the number of page views or the time of any function call.
Instrumentation can be implemented using hot-shots, an open source DogStatsD client for Node.js.
For additional information about the Node.js integration, refer to this guide on submitting metrics.
npm install hot-shots
var StatsD = require('hot-shots'); var dogstatsd = new StatsD(); // Increment a counter. dogstatsd.increment('page.views')
Available for Agent 6+
To log from your Node.js application, it is recommended that you use Winston. You are strongly encouraged to set up your logging libraries to produce your logs in JSON format to avoid having to maintain custom parsing rules.
Follow Datadog’s Node.js logging guide to start forwarding your logs.
Metrics appear in the metrics explorer page.
The Node.js integration does not include any metrics.
The Node.js integration does not include any events.
The Node.js integration does not include any service checks.
Need help? Contact Datadog support.