Skip to content

Commit

Permalink
matching: matching_failures_total metric: add "cached" label 💥
Browse files Browse the repository at this point in the history
  • Loading branch information
derhuerst committed Nov 25, 2024
1 parent 03afc92 commit cf3f3e6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/match.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,9 @@ const runGtfsMatching = async (cfg, opt = {}) => {
name: 'matching_failures_total',
help: 'number of matching failures',
registers: [register],
labelNames: [],
labelNames: [
'cached',
],
})
const errorsTotal = new Counter({
name: 'matching_errors_total',
Expand Down Expand Up @@ -220,7 +222,9 @@ const runGtfsMatching = async (cfg, opt = {}) => {
cached: isCached ? '1' : '0',
})
} else {
failuresTotal.inc()
failuresTotal.inc({
cached: isCached ? '1' : '0',
})
}
matchingTimeSeconds.observe({
matched: isMatched ? '1' : '0',
Expand Down

0 comments on commit cf3f3e6

Please sign in to comment.