Skip to content

Commit

Permalink
Fix: Refactor Prometheus timer metric name format
Browse files Browse the repository at this point in the history
Updated the Prometheus timer metric string format to align with naming conventions. This change ensures consistency by placing 'total' at the end of the metric name.

Signed-off-by: Christian Roessner <c@roessner.co>
  • Loading branch information
Christian Roessner committed Sep 30, 2024
1 parent 85cec2f commit 7d3e77f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/core/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ func prometheusMiddleware() gin.HandlerFunc {
mode = "auth"
}

stopTimer := stats.PrometheusTimer(global.PromRequest, fmt.Sprintf("request_total_%s", strings.ReplaceAll(mode, "-", "_")))
stopTimer := stats.PrometheusTimer(global.PromRequest, fmt.Sprintf("request_%s_total", strings.ReplaceAll(mode, "-", "_")))
path := ctx.FullPath()

if config.LoadableConfig.Server.PrometheusTimer.Enabled {
Expand Down

0 comments on commit 7d3e77f

Please sign in to comment.