Add method label for prometheus middleware metrics (#3226)
Co-authored-by: 蓝益尤 <lan.yiyou@intellif.com>
This commit is contained in:
@@ -136,7 +136,7 @@ func (ng *engine) buildChainWithNativeMiddlewares(fr featuredRoutes, route Route
|
||||
chn = chn.Append(ng.getLogHandler())
|
||||
}
|
||||
if ng.conf.Middlewares.Prometheus {
|
||||
chn = chn.Append(handler.PrometheusHandler(route.Path))
|
||||
chn = chn.Append(handler.PrometheusHandler(route.Path, route.Method))
|
||||
}
|
||||
if ng.conf.Middlewares.MaxConns {
|
||||
chn = chn.Append(handler.MaxConnsHandler(ng.conf.MaxConns))
|
||||
|
||||
Reference in New Issue
Block a user