mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Middleware: Add team metadata to HTTP handlers (#71010)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
This commit is contained in:
@@ -256,6 +256,10 @@ type Cfg struct {
|
||||
MetricsEndpointBasicAuthUsername string
|
||||
MetricsEndpointBasicAuthPassword string
|
||||
MetricsEndpointDisableTotalStats bool
|
||||
// MetricsIncludeTeamLabel configures grafana to set a label for
|
||||
// the team responsible for the code at Grafana labs. We don't expect anyone else to
|
||||
// use this setting.
|
||||
MetricsIncludeTeamLabel bool
|
||||
MetricsTotalStatsIntervalSeconds int
|
||||
MetricsGrafanaEnvironmentInfo map[string]string
|
||||
|
||||
@@ -1088,6 +1092,7 @@ func (cfg *Cfg) Load(args CommandLineArgs) error {
|
||||
cfg.MetricsEndpointBasicAuthUsername = valueAsString(iniFile.Section("metrics"), "basic_auth_username", "")
|
||||
cfg.MetricsEndpointBasicAuthPassword = valueAsString(iniFile.Section("metrics"), "basic_auth_password", "")
|
||||
cfg.MetricsEndpointDisableTotalStats = iniFile.Section("metrics").Key("disable_total_stats").MustBool(false)
|
||||
cfg.MetricsIncludeTeamLabel = iniFile.Section("metrics").Key("include_team_label").MustBool(false)
|
||||
cfg.MetricsTotalStatsIntervalSeconds = iniFile.Section("metrics").Key("total_stats_collector_interval_seconds").MustInt(1800)
|
||||
|
||||
analytics := iniFile.Section("analytics")
|
||||
|
||||
Reference in New Issue
Block a user