Skip to content
This repository has been archived by the owner on Jul 25, 2023. It is now read-only.

Commit

Permalink
Merge pull request #4 from Remitly/lauras-naming
Browse files Browse the repository at this point in the history
Fix naming of metrics to remove service from name as the app name wil…
  • Loading branch information
lshep311 authored Mar 15, 2019
2 parents 124adc8 + d02c4ba commit f25f242
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func NewMiddleware(name string, buckets ...float64) func(next http.Handler) http
var m Middleware
m.reqs = prometheus.NewCounterVec(
prometheus.CounterOpts{
Name: name + "_requests_total",
Name: "http_requests_total",
Help: "How many HTTP requests processed, partitioned by status code, method and HTTP path.",
ConstLabels: prometheus.Labels{"service": name},
},
Expand All @@ -37,7 +37,7 @@ func NewMiddleware(name string, buckets ...float64) func(next http.Handler) http
buckets = dflBuckets
}
m.latency = prometheus.NewHistogramVec(prometheus.HistogramOpts{
Name: name + "_duration_milliseconds",
Name: "http_request_duration_milliseconds",
Help: "How long it took to process the request, partitioned by status code, method and HTTP path.",
ConstLabels: prometheus.Labels{"service": name},
Buckets: buckets,
Expand Down

0 comments on commit f25f242

Please sign in to comment.