mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-16 11:23:11 -06:00
Switched from InstrumentHandler to InstrumentHandlerDuration
This commit is contained in:
parent
7cb71cc957
commit
59c5a06097
|
|
@ -59,7 +59,7 @@ func MakeHTMLAPI(metricsName string, f func(http.ResponseWriter, *http.Request)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return prometheus.InstrumentHandler(metricsName, http.HandlerFunc(withSpan))
|
return prometheus.InstrumentHandlerDuration(metricsName, http.HandlerFunc(withSpan))
|
||||||
}
|
}
|
||||||
|
|
||||||
// MakeInternalAPI turns a util.JSONRequestHandler function into an http.Handler.
|
// MakeInternalAPI turns a util.JSONRequestHandler function into an http.Handler.
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,7 @@ func makeDownloadAPI(
|
||||||
activeRemoteRequests *types.ActiveRemoteRequests,
|
activeRemoteRequests *types.ActiveRemoteRequests,
|
||||||
activeThumbnailGeneration *types.ActiveThumbnailGeneration,
|
activeThumbnailGeneration *types.ActiveThumbnailGeneration,
|
||||||
) http.HandlerFunc {
|
) http.HandlerFunc {
|
||||||
return prometheus.InstrumentHandler(name, http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
|
return prometheus.InstrumentHandlerDuration(name, http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
|
||||||
req = util.RequestWithLogging(req)
|
req = util.RequestWithLogging(req)
|
||||||
|
|
||||||
// Set common headers returned regardless of the outcome of the request
|
// Set common headers returned regardless of the outcome of the request
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue