Comparing version 9.1.0 to 9.2.0
CHANGELOG | ||
========= | ||
## 9.2.0 (2022-7-30) | ||
* @hjr3 Add udpSocketOptions to control how UDP socket is created | ||
## 9.1.0 (2022-6-20) | ||
@@ -5,0 +8,0 @@ * @zhyu Append standard Datadog tags from env vars (DD_ENTITY_ID, DD_ENV, DD_SERVICE, and DD_VERSION) |
@@ -90,2 +90,3 @@ const process = require('process'), | ||
this.closingFlushInterval = options.closingFlushInterval || 50; | ||
this.udpSocketOptions = options.udpSocketOptions || { type: 'udp4' }; | ||
@@ -627,3 +628,4 @@ // If we're mocking the client, create a buffer to record the outgoing calls. | ||
stream: client.stream, | ||
udpSocketOptions: client.udpSocketOptions, | ||
}); | ||
} |
@@ -47,3 +47,3 @@ const assert = require('assert'); | ||
const createUdpTransport = args => { | ||
const socket = dgram.createSocket('udp4'); | ||
const socket = dgram.createSocket(args.udpSocketOptions); | ||
// do not block node from shutting down | ||
@@ -50,0 +50,0 @@ socket.unref(); |
{ | ||
"name": "hot-shots", | ||
"description": "Node.js client for StatsD, DogStatsD, and Telegraf", | ||
"version": "9.1.0", | ||
"version": "9.2.0", | ||
"author": "Steve Ivy", | ||
@@ -6,0 +6,0 @@ "types": "./types.d.ts", |
@@ -68,2 +68,3 @@ # hot-shots | ||
* `closingFlushInterval`: Before closing, StatsD will check for inflight messages. Time (ms) between each check. Defaults to `50`. | ||
* `udpSocketOptions`: Used only when the protocol is `uds`. Specify the options passed into dgram.createSocket(). Defaults to `{ type: 'udp4' }` | ||
@@ -70,0 +71,0 @@ ### StatsD methods |
@@ -33,2 +33,3 @@ import dgram = require("dgram"); | ||
closingFlushInterval?: number; | ||
udpSocketOptions?: dgram.SocketOptions; | ||
} | ||
@@ -35,0 +36,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
90524
1610
308