Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MetricsHandler ¶
func MetricsHandler(handlerID string, m middleware.Middleware) gorestful.FilterFunction
MetricsHandler is based on go-restful middleware.
In the original version, URLPath() uses r.req.Request.URL.Path which results in following stats when querying for individual DPs api_server_http_response_size_bytes_bucket{code="201",handler="/meshes/default/dataplanes/backend-01",method="PUT",service="",le="100"} 1 api_server_http_response_size_bytes_bucket{code="201",handler="/meshes/default/dataplanes/ingress-01",method="PUT",service="",le="100"} 1 this is not scalable solution, we would be producing too many metrics. With r.req.SelectedRoutePath() the metrics look like this api_server_http_request_duration_seconds_bucket{code="201",handler="/meshes/{mesh}/dataplanes/{name}",method="PUT",service="",le="0.005"} 3
Types ¶
This section is empty.