mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
web: add slo group to request meta (#74765)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
This commit is contained in:
@@ -45,6 +45,10 @@ func RequestMetrics(features featuremgmt.FeatureToggles, cfg *setting.Cfg, promR
|
||||
histogramLabels = append(histogramLabels, "team")
|
||||
}
|
||||
|
||||
if features.IsEnabled(featuremgmt.FlagHttpSLOLevels) {
|
||||
histogramLabels = append(histogramLabels, "slo_group")
|
||||
}
|
||||
|
||||
httpRequestDurationHistogram := prometheus.NewHistogramVec(
|
||||
prometheus.HistogramOpts{
|
||||
Namespace: "grafana",
|
||||
@@ -95,6 +99,10 @@ func RequestMetrics(features featuremgmt.FeatureToggles, cfg *setting.Cfg, promR
|
||||
labelValues = append(labelValues, rmd.Team)
|
||||
}
|
||||
|
||||
if features.IsEnabled(featuremgmt.FlagHttpSLOLevels) {
|
||||
labelValues = append(labelValues, string(rmd.SLOGroup))
|
||||
}
|
||||
|
||||
// avoiding the sanitize functions for in the new instrumentation
|
||||
// since they dont make much sense. We should remove them later.
|
||||
histogram := httpRequestDurationHistogram.
|
||||
|
||||
Reference in New Issue
Block a user