Node.js Monitoring Quick Start Guide
Getting started with Instrumental and Node.js
Here's how to get up and running with Node.js application monitoring and Instrumental. Like all our agents, the Node.js agent is designed to prevent exceptions from impacting your application. It's also completely non-blocking.
Installation
Add the agent to your project:
npm install instrumental-agent
Require the agent and configure it with your project token:
var I = require('instrumental-agent'); I.configure({ apiKey: 'PROJECT_TOKEN', enabled: true });
Sending Metrics
Increments are simple counters. learn more
I.increment('job.mailer.name.success' /*, value = 1, time = now, count = 1 */);
Gauges represent a value at a point in time. learn more
I.gauge('queue.name.size', 234 /*, time = now, count = 1 */);
Sending Notices
Notices are project specific events.
I.notice('Deployed revision 038ade4 to production' /*, time = now, duration = 0 */);
Using StatsD or statsite? We’ve got you covered with our StatsD backend and statsite sink