[v10.1.x] Usage stats: Tune collector execution startup and interval (#72790)

Usage stats: Tune collector execution startup and interval (#72688)

* Do not update statistics at service collector startup

* Configurable collector interval

* Introduce initial random delay

* Prevent reporting metrics until the stats have been collected

* Apply suggestion from code review

(cherry picked from commit afb59af79b)

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
This commit is contained in:
grafana-delivery-bot[bot]
2023-08-03 11:39:51 +03:00
committed by GitHub
co-authored by Sofia Papagiannaki
parent 6d7b8e3ebc
commit fbb0466765
8 changed files with 43 additions and 2 deletions
@@ -1711,6 +1711,10 @@ Flush/write interval when sending metrics to external TSDB. Defaults to `10`.
If set to `true`, then total stats generation (`stat_totals_*` metrics) is disabled. Default is `false`.
### total_stats_collector_interval_seconds
Sets the total stats collector interval. The default is 1800 seconds (30 minutes).
### basic_auth_username and basic_auth_password
If both are set, then basic authentication is required to access the metrics endpoint.