Metrics: Adds setting for turning off total stats metrics (#19142)
Don't update total stats metrics if reporting is disabled. New setting disable_total_stats for turning off update of total stats (stat_totals_*) metrics. Ref #19137
This commit is contained in:
@@ -243,6 +243,7 @@ type Cfg struct {
|
||||
MetricsEndpointEnabled bool
|
||||
MetricsEndpointBasicAuthUsername string
|
||||
MetricsEndpointBasicAuthPassword string
|
||||
MetricsEndpointDisableTotalStats bool
|
||||
PluginsEnableAlpha bool
|
||||
PluginsAppsSkipVerifyTLS bool
|
||||
DisableSanitizeHtml bool
|
||||
@@ -907,6 +908,7 @@ func (cfg *Cfg) Load(args *CommandLineArgs) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
cfg.MetricsEndpointDisableTotalStats = iniFile.Section("metrics").Key("disable_total_stats").MustBool(false)
|
||||
|
||||
analytics := iniFile.Section("analytics")
|
||||
ReportingEnabled = analytics.Key("reporting_enabled").MustBool(true)
|
||||
|
||||
Reference in New Issue
Block a user