Commit 28230bbf by Mark Carey Committed by GitHub

Metrics: Adds back missing summary quantiles (#21858)

Adds back missing summary quantiles which was mistakenly
removed in v6.6.0. 

Fixes #21857
parent 140e2676
...@@ -154,6 +154,8 @@ var ( ...@@ -154,6 +154,8 @@ var (
func init() { func init() {
httpStatusCodes := []string{"200", "404", "500", "unknown"} httpStatusCodes := []string{"200", "404", "500", "unknown"}
objectiveMap := map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.99: 0.001}
MInstanceStart = prometheus.NewCounter(prometheus.CounterOpts{ MInstanceStart = prometheus.NewCounter(prometheus.CounterOpts{
Name: "instance_start_total", Name: "instance_start_total",
Help: "counter for started instances", Help: "counter for started instances",
...@@ -193,6 +195,7 @@ func init() { ...@@ -193,6 +195,7 @@ func init() {
prometheus.SummaryOpts{ prometheus.SummaryOpts{
Name: "http_request_duration_milliseconds", Name: "http_request_duration_milliseconds",
Help: "http request summary", Help: "http request summary",
Objectives: objectiveMap,
}, },
[]string{"handler", "statuscode", "method"}, []string{"handler", "statuscode", "method"},
) )
...@@ -218,18 +221,21 @@ func init() { ...@@ -218,18 +221,21 @@ func init() {
MApiDashboardSave = prometheus.NewSummary(prometheus.SummaryOpts{ MApiDashboardSave = prometheus.NewSummary(prometheus.SummaryOpts{
Name: "api_dashboard_save_milliseconds", Name: "api_dashboard_save_milliseconds",
Help: "summary for dashboard save duration", Help: "summary for dashboard save duration",
Objectives: objectiveMap,
Namespace: exporterName, Namespace: exporterName,
}) })
MApiDashboardGet = prometheus.NewSummary(prometheus.SummaryOpts{ MApiDashboardGet = prometheus.NewSummary(prometheus.SummaryOpts{
Name: "api_dashboard_get_milliseconds", Name: "api_dashboard_get_milliseconds",
Help: "summary for dashboard get duration", Help: "summary for dashboard get duration",
Objectives: objectiveMap,
Namespace: exporterName, Namespace: exporterName,
}) })
MApiDashboardSearch = prometheus.NewSummary(prometheus.SummaryOpts{ MApiDashboardSearch = prometheus.NewSummary(prometheus.SummaryOpts{
Name: "api_dashboard_search_milliseconds", Name: "api_dashboard_search_milliseconds",
Help: "summary for dashboard search duration", Help: "summary for dashboard search duration",
Objectives: objectiveMap,
Namespace: exporterName, Namespace: exporterName,
}) })
...@@ -332,18 +338,21 @@ func init() { ...@@ -332,18 +338,21 @@ func init() {
LDAPUsersSyncExecutionTime = prometheus.NewSummary(prometheus.SummaryOpts{ LDAPUsersSyncExecutionTime = prometheus.NewSummary(prometheus.SummaryOpts{
Name: "ldap_users_sync_execution_time", Name: "ldap_users_sync_execution_time",
Help: "summary for LDAP users sync execution duration", Help: "summary for LDAP users sync execution duration",
Objectives: objectiveMap,
Namespace: exporterName, Namespace: exporterName,
}) })
MDataSourceProxyReqTimer = prometheus.NewSummary(prometheus.SummaryOpts{ MDataSourceProxyReqTimer = prometheus.NewSummary(prometheus.SummaryOpts{
Name: "api_dataproxy_request_all_milliseconds", Name: "api_dataproxy_request_all_milliseconds",
Help: "summary for dataproxy request duration", Help: "summary for dataproxy request duration",
Objectives: objectiveMap,
Namespace: exporterName, Namespace: exporterName,
}) })
MAlertingExecutionTime = prometheus.NewSummary(prometheus.SummaryOpts{ MAlertingExecutionTime = prometheus.NewSummary(prometheus.SummaryOpts{
Name: "alerting_execution_time_milliseconds", Name: "alerting_execution_time_milliseconds",
Help: "summary of alert exeuction duration", Help: "summary of alert exeuction duration",
Objectives: objectiveMap,
Namespace: exporterName, Namespace: exporterName,
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment