Skip to content

Commit

Permalink
Handle endpoint type correctly (#1135)
Browse files Browse the repository at this point in the history
  • Loading branch information
aangelisc authored Nov 6, 2024
1 parent 2d900ed commit 0cf8fda
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/httpclient/datasource_metrics_middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ func executeMiddleware(next http.RoundTripper, labels prometheus.Labels) http.Ro
ctx := r.Context()
labels["endpoint"] = ""
if ep := ctx.Value(endpointctx.EndpointCtxKey); ep != nil {
labels["endpoint"] = ep.(string)
labels["endpoint"] = fmt.Sprintf("%v", ep)
}
requestCounter := datasourceRequestCounter.MustCurryWith(labels)
requestHistogram := datasourceRequestHistogram.MustCurryWith(labels)
Expand Down

0 comments on commit 0cf8fda

Please sign in to comment.