Skip to content

Commit

Permalink
Merge pull request github#18693 from github/fix-hydro-event-tags
Browse files Browse the repository at this point in the history
hydro: allow grouping of response stats by code
  • Loading branch information
mikesurowiec authored Apr 12, 2021
2 parents e5400a0 + ba8aa85 commit 8af652f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/hydro.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,9 @@ module.exports = class Hydro {

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

statsd.increment(`hydro.response_code.${res.status}`, 1)
statsd.increment('hydro.response_code.all', 1)
const statTags = [`response_code:${res.status}`]
statsd.increment(`hydro.response_code.${res.status}`, 1, statTags)
statsd.increment('hydro.response_code.all', 1, statTags)

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

0 comments on commit 8af652f

Please sign in to comment.