Cloudinsight SDK for Node.JS
Installation
npm install cloudinsight-sdk
Quick Start Guide
// Require the modulevar StatsD = StatsD;// Instantiate the StatsD, with host, port and global tags specified.// The default host & port is 'localhost:8251'var statsd = '127.0.0.1' 8251 'machineName:awsBeijing1' 'timezone:GMT8' ;// Increment a counter.statsd// Increment a counter with value.statsd// Record a gauge with custom tags and sample rate(50% of the time).statsd
For detailed information, please visit http://docs-ci.oneapm.com/api/nodejs.html