Documentation ¶
Index ¶
Constants ¶
View Source
const (
RequestDurationMetricName = "catalogd_http_request_duration_seconds"
)
Variables ¶
View Source
var ( RequestDurationMetric = prometheus.NewHistogramVec( prometheus.HistogramOpts{ Name: RequestDurationMetricName, Help: "Histogram of request duration in seconds", Buckets: []float64{0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1, 1.2, 1.6, 2, 2.4, 2.8, 3.2, 3.6, 4, 10}, }, []string{"code"}, ) )
Sets up the necessary metrics for calculating the Apdex Score If using Grafana for visualization connected to a Prometheus data source that is scraping these metrics, you can create a panel that uses the following queries + expressions for calculating the Apdex Score where T = 0.5: Query A: sum(catalogd_http_request_duration_seconds_bucket{code!~"5..",le="0.5"}) Query B: sum(catalogd_http_request_duration_seconds_bucket{code!~"5..",le="2"}) Query C: sum(catalogd_http_request_duration_seconds_count) Expression for Apdex Score: ($A + (($B - $A) / 2)) / $C
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.