prometheus

package
v0.0.0-...-6243f22 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 24, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL