mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
instrumentation: rename team to grafana_team to improve alert routing. (#75860)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
This commit is contained in:
parent
cc9a4aa203
commit
3c8cea0764
@ -16,7 +16,7 @@ func TestRequestMetaDefault(t *testing.T) {
|
|||||||
|
|
||||||
m.Get("/", func(rw http.ResponseWriter, req *http.Request) {
|
m.Get("/", func(rw http.ResponseWriter, req *http.Request) {
|
||||||
v := requestmeta.GetRequestMetaData(req.Context())
|
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)
|
req, _ := http.NewRequest(http.MethodGet, "/", nil)
|
||||||
|
@ -42,7 +42,7 @@ func RequestMetrics(features featuremgmt.FeatureToggles, cfg *setting.Cfg, promR
|
|||||||
}
|
}
|
||||||
|
|
||||||
if cfg.MetricsIncludeTeamLabel {
|
if cfg.MetricsIncludeTeamLabel {
|
||||||
histogramLabels = append(histogramLabels, "team")
|
histogramLabels = append(histogramLabels, "grafana_team")
|
||||||
}
|
}
|
||||||
|
|
||||||
if features.IsEnabled(featuremgmt.FlagHttpSLOLevels) {
|
if features.IsEnabled(featuremgmt.FlagHttpSLOLevels) {
|
||||||
|
@ -10,7 +10,7 @@ import (
|
|||||||
const (
|
const (
|
||||||
TeamAlerting = "alerting"
|
TeamAlerting = "alerting"
|
||||||
TeamAuth = "auth"
|
TeamAuth = "auth"
|
||||||
TeamCore = "core"
|
TeamBackend = "backend"
|
||||||
)
|
)
|
||||||
|
|
||||||
type StatusSource string
|
type StatusSource string
|
||||||
@ -119,7 +119,7 @@ func WithStatusSource(ctx context.Context, statusCode int) {
|
|||||||
|
|
||||||
func defaultRequestMetadata() RequestMetaData {
|
func defaultRequestMetadata() RequestMetaData {
|
||||||
return RequestMetaData{
|
return RequestMetaData{
|
||||||
Team: TeamCore,
|
Team: TeamBackend,
|
||||||
StatusSource: StatusSourceServer,
|
StatusSource: StatusSourceServer,
|
||||||
SLOGroup: SLOGroupHighFast,
|
SLOGroup: SLOGroupHighFast,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user