Socket
Socket
Sign inDemoInstall

node-dogstatsd

Package Overview
Dependencies
0
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.5 to 0.0.6

28

lib/statsd.js

@@ -9,3 +9,3 @@ "use strict";

var Client = function(host, port, socket) {
var Client = function(host, port, socket, options) {
this.host = host || "localhost";

@@ -21,2 +21,5 @@ this.port = port || 8125;

this.ephemeral_socket = this.last_used_timer = null;
options = options || {};
this.global_tags = options.global_tags;
};

@@ -114,2 +117,7 @@

Client.prototype.send = function(data, sample_rate, tags) {
if (!tags && Array.isArray(sample_rate)) {
tags = sample_rate;
sample_rate = undefined;
}
if (!sample_rate)

@@ -131,7 +139,17 @@ sample_rate = 1;

if (tags && Array.isArray(tags)) {
var tagStr = tags.join(",");
if (this.global_tags || tags) {
var merged_tags = [];
for (stat in sampled_data)
sampled_data[stat] = sampled_data[stat] + "|#" + tagStr;
if (Array.isArray(this.global_tags))
merged_tags = merged_tags.concat(this.global_tags);
if (Array.isArray(tags))
merged_tags = merged_tags.concat(tags);
if (merged_tags.length > 0) {
var merged_tags_str = merged_tags.join(',');
for (stat in sampled_data)
sampled_data[stat] = sampled_data[stat] + "|#" + merged_tags_str;
}
}

@@ -138,0 +156,0 @@

3

package.json
{
"name" : "node-dogstatsd",
"description" : "node client for extended StatsD server of Datadog",
"version" : "0.0.5",
"version" : "0.0.6",
"author" : "Young Han Lee",

@@ -13,3 +13,2 @@ "repository" : {

},
"os" : [ "linux", "darwin", "freebsd" ],
"directories" : {

@@ -16,0 +15,0 @@ "lib" : "./lib/"

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc