Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

lynx

Package Overview
Dependencies
Maintainers
2
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lynx - npm Package Compare versions

Comparing version 0.0.11 to 0.1.1

4

lib/lynx.js

@@ -478,3 +478,3 @@ var dgram = require('dgram')

if (this.last_used_timer) {
cancelTimeout(this.last_used_timer);
clearTimeout(this.last_used_timer);
this.last_used_timer = undefined;

@@ -640,2 +640,2 @@ }

module.exports = Lynx;
module.exports = Lynx;

@@ -1,31 +0,47 @@

{ "name" : "lynx"
, "description" : "Minimalistic StatsD client for Node.js programs"
, "version" : "0.0.11"
, "author" : "Lloyd Hilaiel"
, "contributors": [ "Nuno Job <nunojobpinto@gmail.com> (http://nunojob.com)" ]
, "scripts" : { "test": "tap tests/*-test.js" }
, "repository" :
{ "type" : "git"
, "url" : "git://github.com/dscape/lynx.git"
}
, "bugs" : { "web" : "https://github.com/dscape/lynx/issues" }
, "directories" : { "lib" : "./lib/" }
, "main" : "./lib/lynx"
, "keywords" :
[ "stats"
, "metrics"
, "metricsd"
, "statsd"
, "etsy"
, "statsd client"
, "statsd driver"
, "graphite"
]
, "devDependencies": { "tap" : "~0.3.2" }
, "dependencies" : { "mersenne" : "~0.0.3", "statsd-parser": "~0.0.4" }
, "licenses" :
[ { "type" : "MIT"
, "url" : "http://github.com/dscape/lynx/raw/master/LICENSE"
{
"name": "lynx",
"description": "Minimalistic StatsD client for Node.js programs",
"version": "0.1.1",
"author": "Lloyd Hilaiel",
"contributors": [
"Nuno Job <nunojobpinto@gmail.com> (http://nunojob.com)",
"Mark Bogdanoff (https://github.com/bog)"
],
"scripts": {
"test": "tap tests/*-test.js"
},
"repository": {
"type": "git",
"url": "git://github.com/dscape/lynx.git"
},
"bugs": {
"web": "https://github.com/dscape/lynx/issues"
},
"directories": {
"lib": "./lib/"
},
"main": "./lib/lynx",
"keywords": [
"stats",
"metrics",
"metricsd",
"statsd",
"etsy",
"statsd client",
"statsd driver",
"graphite"
],
"devDependencies": {
"tap": "~0.3.2"
},
"dependencies": {
"mersenne": "~0.0.3",
"statsd-parser": "~0.0.4"
},
"licenses": [
{
"type": "MIT",
"url": "http://github.com/dscape/lynx/raw/master/LICENSE"
}
]
}
}

@@ -50,2 +50,21 @@ # lynx

### Sampling
If you want to track something that happens really, really frequently, it can overwhelm StatsD with UDP packets. To work around that, use the optional sampling rate for metrics. This will only send packets a certain percentage of time. For very frequent events, this will give you a statistically accurate representation of your data.
Sample rate is an optional parameter to all of the metric API calls. A valid sample rate is 0.0 - 1.0. Values of 0.0 will never send any packets, and values of 1.0 will send every packet.
In these examples we are samping at a rate of 0.1, meaning 1-in-10 calls to send a sample will actually be sent to StatsD.
```
var metrics = new lynx('localhost', 8125);
metrics.increment('node_test.int', 0.1);
metrics.decrement('node_test.int', 0.1);
metrics.timing('node_test.some_service.task.time', 500, 0.1);
metrics.gauge('gauge.one', 100, 0.1);
metrics.set('set.one', 10, 0.1);
var timer2 = metrics.createTimer('node_test.some_service.task2.time', 0.1);
timer2.stop();
```
### Streams

@@ -52,0 +71,0 @@

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc