Skip to content
This repository was archived by the owner on Oct 21, 2024. It is now read-only.

Commit 8b8b9fc

Browse files
kcroakerrochdev
authored andcommitted
Switch from node-dogstatsd to hot-shots (#11)
1 parent 26e75d1 commit 8b8b9fc

File tree

4 files changed

+37
-5
lines changed

4 files changed

+37
-5
lines changed

lib/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
const DD = require("node-dogstatsd").StatsD;
1+
const hotShots = require("hot-shots");
22

33
module.exports = function (options) {
4-
let datadog = options.dogstatsd || new DD();
4+
let datadog = options.dogstatsd || new hotShots.StatsD("localhost", 8125);
55
let stat = options.stat || "node.express.router";
66
let tags = options.tags || [];
77
let path = options.path || false;

lib/index.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const mockStatsDImplementation = {
55
increment: jest.fn(),
66
}
77

8-
jest.mock('node-dogstatsd', () => ({
8+
jest.mock('hot-shots', () => ({
99
StatsD: jest.fn().mockImplementation(() => mockStatsDImplementation),
1010
}))
1111

package-lock.json

Lines changed: 33 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"node": ">=8"
2222
},
2323
"dependencies": {
24-
"node-dogstatsd": "0.0.6"
24+
"hot-shots": "^6.3.0"
2525
},
2626
"devDependencies": {
2727
"jest": "^24.8.0"

0 commit comments

Comments
 (0)