Skip to content

Commit

Permalink
Merge pull request #3 from carousell/update-metrics
Browse files Browse the repository at this point in the history
update metrics label
  • Loading branch information
badboyd authored May 19, 2023
2 parents 19741e9 + e8c6f51 commit 47fce44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion prometheus.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func (p *Prometheus) HandlerFunc() gin.HandlerFunc {
status := strconv.Itoa(c.Writer.Status())
elapsed := float64(time.Since(start)) / float64(time.Second)

p.reqDur.WithLabelValues(status, c.Request.Method+"_"+c.HandlerName()).Observe(elapsed)
p.reqDur.WithLabelValues(status, c.Request.Method+"_"+c.Request.URL.Path).Observe(elapsed)

}
}
Expand Down

0 comments on commit 47fce44

Please sign in to comment.