We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 720c194 commit db4695dCopy full SHA for db4695d
1 file changed
lib/hydro.js
@@ -68,7 +68,7 @@ module.exports = class Hydro {
68
})
69
const token = this.generatePayloadHmac(body)
70
71
- const fn = () => fetch(this.endpoint, {
+ const doFetch = () => fetch(this.endpoint, {
72
method: 'POST',
73
body,
74
headers: {
@@ -78,7 +78,7 @@ module.exports = class Hydro {
78
}
79
80
81
- const res = await hydroStats.asyncTimer(fn, 'response_time')
+ const res = await hydroStats.asyncTimer(doFetch, 'response_time')()
82
83
hydroStats.increment(`response_code.${res.statusCode}`, 1)
84
hydroStats.increment('response_code.all', 1)
0 commit comments