Skip to content

Commit 8af652f

Browse files
authored
Merge pull request github#18693 from github/fix-hydro-event-tags
hydro: allow grouping of response stats by code
2 parents e5400a0 + ba8aa85 commit 8af652f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/hydro.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,9 @@ module.exports = class Hydro {
7676

7777
const res = await statsd.asyncTimer(doFetch, 'hydro.response_time')()
7878

79-
statsd.increment(`hydro.response_code.${res.status}`, 1)
80-
statsd.increment('hydro.response_code.all', 1)
79+
const statTags = [`response_code:${res.status}`]
80+
statsd.increment(`hydro.response_code.${res.status}`, 1, statTags)
81+
statsd.increment('hydro.response_code.all', 1, statTags)
8182

8283
// Track hydro exceptions in Sentry, but don't track 503s because we can't do anything about service availability
8384
if (!res.ok && res.status !== 503) {

0 commit comments

Comments
 (0)