instrumentation: rename team to grafana_team to improve alert routing. (#75860)

Signed-off-by: bergquist <carl.bergquist@gmail.com>
This commit is contained in:
Carl Bergquist 2023-10-03 12:25:01 +02:00 committed by GitHub
parent cc9a4aa203
commit 3c8cea0764
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -16,7 +16,7 @@ func TestRequestMetaDefault(t *testing.T) {
m.Get("/", func(rw http.ResponseWriter, req *http.Request) {
v := requestmeta.GetRequestMetaData(req.Context())
assert.Equal(t, requestmeta.TeamCore, v.Team)
assert.Equal(t, requestmeta.TeamBackend, v.Team)
})
req, _ := http.NewRequest(http.MethodGet, "/", nil)

View File

@ -42,7 +42,7 @@ func RequestMetrics(features featuremgmt.FeatureToggles, cfg *setting.Cfg, promR
}
if cfg.MetricsIncludeTeamLabel {
histogramLabels = append(histogramLabels, "team")
histogramLabels = append(histogramLabels, "grafana_team")
}
if features.IsEnabled(featuremgmt.FlagHttpSLOLevels) {

View File

@ -10,7 +10,7 @@ import (
const (
TeamAlerting = "alerting"
TeamAuth = "auth"
TeamCore = "core"
TeamBackend = "backend"
)
type StatusSource string
@ -119,7 +119,7 @@ func WithStatusSource(ctx context.Context, statusCode int) {
func defaultRequestMetadata() RequestMetaData {
return RequestMetaData{
Team: TeamCore,
Team: TeamBackend,
StatusSource: StatusSourceServer,
SLOGroup: SLOGroupHighFast,
}