mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Analytics: Enable grafana and plugin update checks to be operated independently (#46352)
* add separate cfg for controlling plugin update checks * https * add specific version note to docs * pr feedback * fixup
This commit is contained in:
@@ -28,7 +28,7 @@ type GrafanaService struct {
|
||||
|
||||
func ProvideGrafanaService(cfg *setting.Cfg) *GrafanaService {
|
||||
return &GrafanaService{
|
||||
enabled: cfg.CheckForUpdates,
|
||||
enabled: cfg.CheckForGrafanaUpdates,
|
||||
grafanaVersion: cfg.BuildVersion,
|
||||
httpClient: http.Client{Timeout: 10 * time.Second},
|
||||
log: log.New("grafana.update.checker"),
|
||||
|
||||
@@ -29,7 +29,7 @@ type PluginsService struct {
|
||||
|
||||
func ProvidePluginsService(cfg *setting.Cfg, pluginStore plugins.Store) *PluginsService {
|
||||
return &PluginsService{
|
||||
enabled: cfg.CheckForUpdates,
|
||||
enabled: cfg.CheckForPluginUpdates,
|
||||
grafanaVersion: cfg.BuildVersion,
|
||||
httpClient: &http.Client{Timeout: 10 * time.Second},
|
||||
log: log.New("plugins.update.checker"),
|
||||
|
||||
@@ -387,7 +387,8 @@ type Cfg struct {
|
||||
Env string
|
||||
|
||||
// Analytics
|
||||
CheckForUpdates bool
|
||||
CheckForGrafanaUpdates bool
|
||||
CheckForPluginUpdates bool
|
||||
ReportingDistributor string
|
||||
ReportingEnabled bool
|
||||
ApplicationInsightsConnectionString string
|
||||
@@ -929,7 +930,8 @@ func (cfg *Cfg) Load(args CommandLineArgs) error {
|
||||
cfg.MetricsEndpointDisableTotalStats = iniFile.Section("metrics").Key("disable_total_stats").MustBool(false)
|
||||
|
||||
analytics := iniFile.Section("analytics")
|
||||
cfg.CheckForUpdates = analytics.Key("check_for_updates").MustBool(true)
|
||||
cfg.CheckForGrafanaUpdates = analytics.Key("check_for_updates").MustBool(true)
|
||||
cfg.CheckForPluginUpdates = analytics.Key("check_for_plugin_updates").MustBool(true)
|
||||
GoogleAnalyticsId = analytics.Key("google_analytics_ua_id").String()
|
||||
GoogleTagManagerId = analytics.Key("google_tag_manager_id").String()
|
||||
RudderstackWriteKey = analytics.Key("rudderstack_write_key").String()
|
||||
|
||||
Reference in New Issue
Block a user