monitor-dog
Advanced tools
Comparing version 1.5.0 to 1.5.2
@@ -37,4 +37,6 @@ 'use strict'; | ||
this.interval = opt.interval || process.env.MONITOR_INTERVAL; | ||
this.client = new StatsD(this.host, this.port); | ||
this.socketsMonitor = new SocketsMonitor(this); | ||
if (this.host && this.port) { | ||
this.client = new StatsD(this.host, this.port); | ||
this.socketsMonitor = new SocketsMonitor(this); | ||
} | ||
} | ||
@@ -80,2 +82,6 @@ | ||
Monitor.prototype[method] = function () { | ||
if (!this.client) { | ||
return; | ||
} | ||
var args = Array.prototype.slice.call(arguments); | ||
@@ -117,2 +123,5 @@ if (this.prefix) { | ||
Monitor.prototype.event = function (opt) { | ||
if (!this.client) { | ||
return; | ||
} | ||
if (!isObject(opt)) { | ||
@@ -119,0 +128,0 @@ throw new Error('Missing required options'); |
{ | ||
"name": "monitor-dog", | ||
"version": "1.5.0", | ||
"version": "1.5.2", | ||
"description": "A helpful wrapper for dogstatsd.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -135,3 +135,3 @@ # monitor-dog | ||
```js | ||
monitor.captureStream('some-name', yourStream); | ||
monitor.captureStreamEvents('some-name', yourStream); | ||
``` | ||
@@ -138,0 +138,0 @@ |
@@ -31,7 +31,2 @@ 'use strict'; | ||
describe('event', function() { | ||
it('should throw an error when not given options', function(done) { | ||
expect(monitor.event).throws(); | ||
done(); | ||
}); | ||
it('should throw an error if the title is missing', function(done) { | ||
@@ -38,0 +33,0 @@ var error = null; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
74857
21
1462