Comparing version 7.7.1 to 7.8.0
CHANGELOG | ||
========= | ||
## 7.8.0 (2020-8-28) | ||
* @bdeitte Fix some flaky tests | ||
* @ralphiech Add missing error handler when socket is not created | ||
* @ralphiech Add missing socket checks | ||
* @dependabot Bump lodash from 4.17.15 to 4.17.19 | ||
* @DerGut Add "Congestion error" section to README | ||
## 7.7.1 (2020-8-4) | ||
@@ -5,0 +12,0 @@ * @DerGut Fix udsGracefulErrorHandling default value |
@@ -109,3 +109,3 @@ const util = require('util'), | ||
if (!options.isChild && options.errorHandler) { | ||
if (this.socket && !options.isChild && options.errorHandler) { | ||
this.socket.on('error', options.errorHandler); | ||
@@ -123,3 +123,3 @@ } | ||
// does not support options.isChild (how to re-create a socket you didn't create?) | ||
if (!options.isChild && options.protocol === PROTOCOL.UDS && this.udsGracefulErrorHandling) { | ||
if (this.socket && !options.isChild && options.protocol === PROTOCOL.UDS && this.udsGracefulErrorHandling) { | ||
const socketCreateLimit = options.udsGracefulRestartRateLimit || UDS_DEFAULT_GRACEFUL_RESTART_LIMIT; // only recreate once per second | ||
@@ -360,7 +360,9 @@ const lastSocketCreateTime = Date.now(); | ||
if (!this.socket) { | ||
const error = 'Socket not created properly. Check previous errors for details.'; | ||
const error = new Error('Socket not created properly. Check previous errors for details.'); | ||
if (callback) { | ||
return callback(new Error(error)); | ||
return callback(error); | ||
} else if (this.errorHandler) { | ||
return this.errorHandler(error); | ||
} else { | ||
return console.error(error); | ||
return console.error(String(error)); | ||
} | ||
@@ -367,0 +369,0 @@ } |
{ | ||
"name": "hot-shots", | ||
"description": "Node.js client for StatsD, DogStatsD, and Telegraf", | ||
"version": "7.7.1", | ||
"version": "7.8.0", | ||
"author": "Steve Ivy", | ||
@@ -6,0 +6,0 @@ "types": "./types.d.ts", |
@@ -247,2 +247,9 @@ # hot-shots | ||
### Congestion error | ||
If you get an error like `Error sending hot-shots message: Error: congestion` with an error code of `1`, | ||
it is probably because you are sending large volumes of metrics to a single agent/ server. | ||
This error only arises when using the UDS protocol and means that packages are being dropped. | ||
Take a look at the [Datadog docs](https://docs.datadoghq.com/developers/dogstatsd/high_throughput/?#over-uds-unix-domain-socket) for some tips on tuning your connection. | ||
## Unix domain socket support | ||
@@ -249,0 +256,0 @@ |
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
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
79847
1465
298