{"_id":"node-statsd","_rev":"40-f8dac53bad22246b95666e2062cd29ff","name":"node-statsd","description":"node client for Etsy'd StatsD server","dist-tags":{"latest":"0.1.1"},"versions":{"0.0.1":{"name":"node-statsd","description":"node client for Etsy'd StatsD server","version":"0.0.1","author":{"name":"Steve Ivy"},"repository":{"type":"git","url":"git://github.com/sivy/node-statsd.git"},"bugs":{"url":"https://github.com/sivy/node-statsd/issues"},"os":["linux","darwin","freebsd"],"directories":{"lib":"./lib/"},"main":"./lib/apac","engines":{"node":">=0.1.97"},"dependencies":{"mersenne":"*"},"licenses":[{"type":"MIT","url":"http://github.com/sivy/node-stats/raw/master/LICENSE"}],"_id":"node-statsd@0.0.1","_engineSupported":true,"_npmVersion":"0.2.13","_nodeVersion":"v0.4.1","dist":{"shasum":"71d8049e2c5b51d7b1a3f9ee76af722a4ddf529e","tarball":"https://registry.npmjs.org/node-statsd/-/node-statsd-0.0.1.tgz","integrity":"sha512-pRKly6XxYfrrAtMHOTdQHTs75SOeVpi/I16z2WDAn/d4VpeMitXLTdGbgKiZyDHA1UZuLmqNbUmbvlxViUBGOQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIESKP4VyJ/crnhI6aOgb92TdAOD67Fzm4RgwBSO0gm6+AiBSdd2Qc/G6c3+WeMCuuyYQCQB+RQMdY8zAT9nVzam5PQ=="}]}},"0.0.2":{"name":"node-statsd","description":"node client for Etsy'd StatsD server","version":"0.0.2","author":{"name":"Steve Ivy"},"repository":{"type":"git","url":"git://github.com/sivy/node-statsd.git"},"bugs":{"url":"https://github.com/sivy/node-statsd/issues"},"os":["linux","darwin","freebsd"],"directories":{"lib":"./lib/"},"main":"./lib/statsd","engines":{"node":">=0.1.97"},"dependencies":{"mersenne":"*"},"licenses":[{"type":"MIT","url":"http://github.com/sivy/node-stats/raw/master/LICENSE"}],"_id":"node-statsd@0.0.2","_engineSupported":true,"_npmVersion":"0.2.13","_nodeVersion":"v0.4.1","dist":{"shasum":"ba96c26d4ec22b4f9501bb332fdf740db5a40ee7","tarball":"https://registry.npmjs.org/node-statsd/-/node-statsd-0.0.2.tgz","integrity":"sha512-L4nP42OvGJ678EnsbqYnsJE9AkRCYPF5QH5fRIsjTkSAZK5GyE+uMOBJyKlaGxjEx11ZXS/gIV34CnQokO1I/Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEIUkqNLKLfg+etOEdOg1g3Svl+Nd4OHPCPoybo0PZzrAiB8LmSLr+iqzJDfiHciLBfJ0uMgNtm0GpwNBot2K9wVUg=="}]},"maintainers":[{"name":"steveivy","email":"steveivy@gmail.com"}]},"0.0.3":{"name":"node-statsd","description":"node client for Etsy'd StatsD server","version":"0.0.3","author":{"name":"Steve Ivy"},"repository":{"type":"git","url":"git://github.com/sivy/node-statsd.git"},"bugs":{"url":"https://github.com/sivy/node-statsd/issues"},"os":["linux","darwin","freebsd"],"directories":{"lib":"./lib/"},"main":"./lib/statsd","engines":{"node":">=0.1.97"},"dependencies":{"mersenne":"*"},"licenses":[{"type":"MIT","url":"http://github.com/sivy/node-stats/raw/master/LICENSE"}],"_id":"node-statsd@0.0.3","dist":{"shasum":"46a6fc98bf1a73af6744247b7d5f6521687e5ebc","tarball":"https://registry.npmjs.org/node-statsd/-/node-statsd-0.0.3.tgz","integrity":"sha512-f0fZCtXKq26ijWBhcrqIo2Y2jKOABbh9Xn6onUAPXZX3YRYQWfbS68P3yIP3dMA3hUgnPAsin2exhoYMo7aEzg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA4yZtEp/QmBBG+ptj4daF6j1RDeJFZJjdGbT801cAvPAiEAqY6u6mR0ImJVpnSrrxlKdLzzr5T6oj9ZvKRm1K1cBlc="}]},"_npmVersion":"1.1.59","_npmUser":{"name":"dieter","email":"dieter@plaetinck.be"},"maintainers":[{"name":"steveivy","email":"steveivy@gmail.com"},{"name":"dieter","email":"dieter@plaetinck.be"}]},"0.0.4":{"name":"node-statsd","description":"node client for Etsy'd StatsD server","version":"0.0.4","author":{"name":"Steve Ivy"},"contributors":[{"name":"Russ Bradberry","email":"rbradberry@gmail.com"}],"repository":{"type":"git","url":"git://github.com/sivy/node-statsd.git"},"bugs":{"url":"https://github.com/sivy/node-statsd/issues"},"directories":{"lib":"./lib/"},"engines":{"node":">=0.1.97"},"scripts":{"test":"node ./node_modules/mocha/bin/mocha -R spec"},"dependencies":{},"devDependencies":{"mocha":"*"},"licenses":[{"type":"MIT","url":"http://github.com/sivy/node-stats/raw/master/LICENSE"}],"_id":"node-statsd@0.0.4","dist":{"shasum":"13078eaa193654da4414483efa72e98de75b2933","tarball":"https://registry.npmjs.org/node-statsd/-/node-statsd-0.0.4.tgz","integrity":"sha512-nMCYzb6Y/vaIh+ur6/nPvKWHMiecn4jnu/NubraIiTk7sncA5/F+Zk/5awmQPnRSufNshmnWH04tV/+F3uYhDw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFn7IALH2vUlfnIxP/Sw8ZzYC//ztwKcpyfUIPmzl3EjAiEAz4xYz2YfvMEjQxuVRYf/styWjIqV4Sv2XnZMexo3eDY="}]},"_from":".","_npmVersion":"1.2.14","_npmUser":{"name":"devdazed","email":"rbradberry@gmail.com"},"maintainers":[{"name":"steveivy","email":"steveivy@gmail.com"},{"name":"dieter","email":"dieter@plaetinck.be"},{"name":"devdazed","email":"rbradberry@gmail.com"}]},"0.0.5":{"name":"node-statsd","description":"node client for Etsy'd StatsD server","version":"0.0.5","author":{"name":"Steve Ivy"},"contributors":[{"name":"Russ Bradberry","email":"rbradberry@gmail.com"}],"repository":{"type":"git","url":"git://github.com/sivy/node-statsd.git"},"bugs":{"url":"https://github.com/sivy/node-statsd/issues"},"directories":{"lib":"./lib/"},"engines":{"node":">=0.1.97"},"scripts":{"test":"node ./node_modules/mocha/bin/mocha -R spec"},"dependencies":{},"devDependencies":{"mocha":"*"},"licenses":[{"type":"MIT","url":"http://github.com/sivy/node-stats/raw/master/LICENSE"}],"_id":"node-statsd@0.0.5","dist":{"shasum":"7e32898cd7d448b50f37b7f83f0968d7be31f3ef","tarball":"https://registry.npmjs.org/node-statsd/-/node-statsd-0.0.5.tgz","integrity":"sha512-gUpRvq7ooE4Ll7ODNm7OFB+BwNUuS64on9pj/llQwnsBpdGeg2tlZ5bQMGkvNF4utoksxC6KVh8zdPEzforYbA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGgTYKSpWkKLWHx78O5KFFfuj2Zul5he+Y3a609R3OsOAiAT4xL/3dyzWqOST9jnbknVXjxbv9IIufEZgNb0c0Z66g=="}]},"_from":".","_npmVersion":"1.2.14","_npmUser":{"name":"devdazed","email":"rbradberry@gmail.com"},"maintainers":[{"name":"steveivy","email":"steveivy@gmail.com"},{"name":"dieter","email":"dieter@plaetinck.be"},{"name":"devdazed","email":"rbradberry@gmail.com"}]},"0.0.6":{"name":"node-statsd","description":"node client for Etsy'd StatsD server","version":"0.0.6","author":{"name":"Steve Ivy"},"contributors":[{"name":"Russ Bradberry","email":"rbradberry@gmail.com"}],"repository":{"type":"git","url":"git://github.com/sivy/node-statsd.git"},"bugs":{"url":"https://github.com/sivy/node-statsd/issues"},"directories":{"lib":"./lib/"},"engines":{"node":">=0.1.97"},"scripts":{"test":"node ./node_modules/mocha/bin/mocha -R spec"},"dependencies":{},"devDependencies":{"mocha":"*"},"licenses":[{"type":"MIT","url":"http://github.com/sivy/node-stats/raw/master/LICENSE"}],"_id":"node-statsd@0.0.6","dist":{"shasum":"18de193a1c7dffec6435c78441e3a109eb08f627","tarball":"https://registry.npmjs.org/node-statsd/-/node-statsd-0.0.6.tgz","integrity":"sha512-bMtk6zmLSg6mzhFc65uEZYywgkXT+elt8vB8ISORxK1QO3g9QXV3JahX10nAuSbQCprAV1/cFG/fiB1TJTfJCw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBeVjSP/CcnuGJDGxA9IrsEw1aiMzqF1IHLGfT5TJFG3AiAUFqdN3+ss4l43+dVSo2sJPWZUpoVqsju4aU2qWovOGQ=="}]},"_from":".","_npmVersion":"1.2.14","_npmUser":{"name":"devdazed","email":"rbradberry@gmail.com"},"maintainers":[{"name":"steveivy","email":"steveivy@gmail.com"},{"name":"dieter","email":"dieter@plaetinck.be"},{"name":"devdazed","email":"rbradberry@gmail.com"}]},"0.0.7":{"name":"node-statsd","description":"node client for Etsy'd StatsD server","version":"0.0.7","author":{"name":"Steve Ivy"},"contributors":[{"name":"Russ Bradberry","email":"rbradberry@gmail.com"}],"repository":{"type":"git","url":"git://github.com/sivy/node-statsd.git"},"bugs":{"url":"https://github.com/sivy/node-statsd/issues"},"directories":{"lib":"./lib/"},"engines":{"node":">=0.1.97"},"scripts":{"test":"node ./node_modules/mocha/bin/mocha -R spec"},"dependencies":{},"devDependencies":{"mocha":"*"},"licenses":[{"type":"MIT","url":"http://github.com/sivy/node-stats/raw/master/LICENSE"}],"_id":"node-statsd@0.0.7","dist":{"shasum":"96d4bbd21dff2d798b3374a3e9329cfecce3afa8","tarball":"https://registry.npmjs.org/node-statsd/-/node-statsd-0.0.7.tgz","integrity":"sha512-i0W9jusepoV/9e3o5Q1vB0z45lb3Cbn9tOzEQ8OZekgUCLqr2wP2UJthM9LIwmbX7p8O0i71GdU02agxuEwj4g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD1jix3zhwMzpwJbuAtJNGEugTRFmNlHdnifUzeY3U72AIhANjZAelXMdzDUOocDUf2ZWYTxpCdQfP9E4LOi+WRCAfu"}]},"_from":".","_npmVersion":"1.2.14","_npmUser":{"name":"devdazed","email":"rbradberry@gmail.com"},"maintainers":[{"name":"steveivy","email":"steveivy@gmail.com"},{"name":"dieter","email":"dieter@plaetinck.be"},{"name":"devdazed","email":"rbradberry@gmail.com"}]},"0.1.0":{"name":"node-statsd","description":"node client for Etsy'd StatsD server","version":"0.1.0","author":{"name":"Steve Ivy"},"contributors":[{"name":"Russ Bradberry","email":"rbradberry@gmail.com"}],"repository":{"type":"git","url":"git://github.com/sivy/node-statsd.git"},"bugs":{"url":"https://github.com/sivy/node-statsd/issues"},"directories":{"lib":"./lib/"},"engines":{"node":">=0.1.97"},"scripts":{"test":"mocha -R spec"},"dependencies":{},"devDependencies":{"mocha":"*"},"licenses":[{"type":"MIT","url":"http://github.com/sivy/node-stats/raw/master/LICENSE"}],"gitHead":"032a03ab6d993c9002d91333c3a117be2377d3ca","homepage":"https://github.com/sivy/node-statsd","_id":"node-statsd@0.1.0","_shasum":"3c19db2d051b732936da1067d844306d08732bac","_from":".","_npmVersion":"1.4.23","_npmUser":{"name":"devdazed","email":"rbradberry@gmail.com"},"maintainers":[{"name":"steveivy","email":"steveivy@gmail.com"},{"name":"dieter","email":"dieter@plaetinck.be"},{"name":"devdazed","email":"rbradberry@gmail.com"}],"dist":{"shasum":"3c19db2d051b732936da1067d844306d08732bac","tarball":"https://registry.npmjs.org/node-statsd/-/node-statsd-0.1.0.tgz","integrity":"sha512-FDHLBiUtLCLvSnsnErtaSG0sxwDM1Wpd5WXX8oX+c++KQfgI+hl3SrRmbdc2Vf3bcWbAuMLRs0pGUxycK7UG3A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDJaQ+eWdNXj7fRyjIBrCL3JrAmKkeRPdKutoFsYZ1CmAiEA7iAyhacT7FGSYenSdGbdHW4fgv9yZ90EznTGmebPM1Y="}]}},"0.1.1":{"name":"node-statsd","description":"node client for Etsy'd StatsD server","version":"0.1.1","author":{"name":"Steve Ivy"},"contributors":[{"name":"Russ Bradberry","email":"rbradberry@gmail.com"}],"repository":{"type":"git","url":"git://github.com/sivy/node-statsd.git"},"bugs":{"url":"https://github.com/sivy/node-statsd/issues"},"directories":{"lib":"./lib/"},"engines":{"node":">=0.1.97"},"scripts":{"test":"mocha -R spec"},"dependencies":{},"devDependencies":{"mocha":"*"},"licenses":[{"type":"MIT","url":"http://github.com/sivy/node-stats/raw/master/LICENSE"}],"gitHead":"f9fac424543661b2ee2a9348a5fe02f684f4c02f","homepage":"https://github.com/sivy/node-statsd","_id":"node-statsd@0.1.1","_shasum":"27a59348763d0af7a037ac2a031fef3f051013d3","_from":".","_npmVersion":"1.4.23","_npmUser":{"name":"devdazed","email":"rbradberry@gmail.com"},"maintainers":[{"name":"steveivy","email":"steveivy@gmail.com"},{"name":"dieter","email":"dieter@plaetinck.be"},{"name":"devdazed","email":"rbradberry@gmail.com"}],"dist":{"shasum":"27a59348763d0af7a037ac2a031fef3f051013d3","tarball":"https://registry.npmjs.org/node-statsd/-/node-statsd-0.1.1.tgz","integrity":"sha512-QDf6R8VXF56QVe1boek8an/Rb3rSNaxoFWb7Elpsv2m1+Noua1yy0F1FpKpK5VluF8oymWM4w764A4KsYL4pDg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHWjCz7H5OpHeeW9WPqkV0/xQ0jq6oBIA7XW+4ZTCnYdAiAvLQbbDTXTEcsgvpO+96kAN5YO87u+hZJqZa//IzKlCg=="}]}}},"maintainers":[{"name":"steveivy","email":"steveivy@gmail.com"},{"name":"dieter","email":"dieter@plaetinck.be"},{"name":"devdazed","email":"rbradberry@gmail.com"}],"time":{"modified":"2023-02-12T08:12:14.967Z","created":"2011-02-25T01:39:53.638Z","0.0.1":"2011-02-25T01:39:53.918Z","0.0.2":"2011-08-09T12:49:20.979Z","0.0.3":"2012-09-12T07:57:45.127Z","0.0.4":"2013-03-25T17:33:28.285Z","0.0.5":"2013-03-26T15:42:47.541Z","0.0.6":"2013-03-27T16:08:30.767Z","0.0.7":"2013-04-16T16:55:47.271Z","0.1.0":"2014-11-17T15:09:10.159Z","0.1.1":"2014-12-15T18:56:21.818Z"},"author":{"name":"Steve Ivy"},"repository":{"type":"git","url":"git://github.com/sivy/node-statsd.git"},"users":{"piron_t":true,"sahilsk":true,"passcod":true,"leizongmin":true,"antanst":true,"hugojosefson":true,"wangnan0610":true,"shreyawhiz":true,"rmanalan":true,"joselcs":true,"swift2728":true},"contributors":[{"name":"Russ Bradberry","email":"rbradberry@gmail.com"}],"bugs":{"url":"https://github.com/sivy/node-statsd/issues"},"readme":"# node-statsd\n\nA node.js client for [Etsy](http://etsy.com)'s [StatsD](https://github.com/etsy/statsd) server.\n\nThis client will let you fire stats at your StatsD server from a node.js application.\n\nnode-statsd Runs and is tested on Node 0.6+ on all *nix platforms and 0.8+ on all platforms including Windows.\n\n[![Build Status](https://secure.travis-ci.org/sivy/node-statsd.png?branch=master)](http://travis-ci.org/sivy/node-statsd)\n\n## Installation\n\n```\n$ npm install node-statsd\n```\n\n## Usage\n\nAll initialization parameters are optional.\n\nParameters (specified as an options hash):\n* `host`:        The host to send stats to `default: localhost`\n* `port`:        The port to send stats to `default: 8125`\n* `prefix`:      What to prefix each stat name with `default: ''`\n* `suffix`:      What to suffix each stat name with `default: ''`\n* `globalize`:   Expose this StatsD instance globally? `default: false`\n* `cacheDns`:    Cache the initial dns lookup to *host* `default: false`\n* `mock`:        Create a mock StatsD instance, sending no stats to the server? `default: false`\n* `global_tags`: Optional tags that will be added to every metric `default: []`\n\nAll StatsD methods have the same API:\n* `name`:       Stat name `required`\n* `value`:      Stat value `required except in increment/decrement where it defaults to 1/-1 respectively`\n* `sampleRate`: Sends only a sample of data to StatsD `default: 1`\n* `tags`:       The Array of tags to add to metrics `default: []`\n* `callback`:   The callback to execute once the metric has been sent\n\nIf an array is specified as the `name` parameter each item in that array will be sent along with the specified value.\n\n```javascript\n  var StatsD = require('node-statsd'),\n      client = new StatsD();\n\n  // Timing: sends a timing command with the specified milliseconds\n  client.timing('response_time', 42);\n\n  // Increment: Increments a stat by a value (default is 1)\n  client.increment('my_counter');\n\n  // Decrement: Decrements a stat by a value (default is -1)\n  client.decrement('my_counter');\n\n  // Histogram: send data for histogram stat\n  client.histogram('my_histogram', 42);\n\n  // Gauge: Gauge a stat by a specified amount\n  client.gauge('my_gauge', 123.45);\n\n  // Set: Counts unique occurrences of a stat (alias of unique)\n  client.set('my_unique', 'foobar');\n  client.unique('my_unique', 'foobarbaz');\n\n  // Incrementing multiple items\n  client.increment(['these', 'are', 'different', 'stats']);\n\n  // Sampling, this will sample 25% of the time the StatsD Daemon will compensate for sampling\n  client.increment('my_counter', 1, 0.25);\n\n  // Tags, this will add user-defined tags to the data\n  client.histogram('my_histogram', 42, ['foo', 'bar']);\n\n  // Using the callback\n  client.set(['foo', 'bar'], 42, function(error, bytes){\n    //this only gets called once after all messages have been sent\n    if(error){\n      console.error('Oh noes! There was an error:', error);\n    } else {\n      console.log('Successfully sent', bytes, 'bytes');\n    }\n  });\n\n  // Sampling, tags and callback are optional and could be used in any combination\n  client.histogram('my_histogram', 42, 0.25); // 25% Sample Rate\n  client.histogram('my_histogram', 42, ['tag']); // User-defined tag\n  client.histogram('my_histogram', 42, next); // Callback\n  client.histogram('my_histogram', 42, 0.25, ['tag']);\n  client.histogram('my_histogram', 42, 0.25, next);\n  client.histogram('my_histogram', 42, ['tag'], next);\n  client.histogram('my_histogram', 42, 0.25, ['tag'], next);\n```\n\n## Errors\n\nIn the event that there is a socket error, `node-statsd` will allow this error to bubble up.  If you would like to catch the errors, just attach a listener to the socket property on the instance.\n\n```javascript\nclient.socket.on('error', function(error) {\n  return console.error(\"Error in socket: \", error);\n});\n```\n\nIf you want to catch errors in sending a message then use the callback provided.\n\n## License\n\nnode-statsd is licensed under the MIT license.\n\n","readmeFilename":"README.md","homepage":"https://github.com/sivy/node-statsd"}