mirror of
https://github.com/grafana/grafana.git
synced 2026-08-18 17:15:08 -05:00
Chore: Fix grafana live stats reset when sending usage stats (#39558)
This commit is contained in:
@@ -1031,7 +1031,13 @@ func (g *GrafanaLive) sampleLiveStats() {
|
||||
}
|
||||
}
|
||||
|
||||
func (g *GrafanaLive) resetLiveStats() {
|
||||
g.usageStats = usageStats{}
|
||||
}
|
||||
|
||||
func (g *GrafanaLive) registerUsageMetrics() {
|
||||
g.usageStatsService.RegisterSendReportCallback(g.resetLiveStats)
|
||||
|
||||
g.usageStatsService.RegisterMetricsFunc(func() (map[string]interface{}, error) {
|
||||
liveUsersAvg := 0
|
||||
liveClientsAvg := 0
|
||||
@@ -1051,8 +1057,6 @@ func (g *GrafanaLive) registerUsageMetrics() {
|
||||
"stats.live_clients_avg.count": liveClientsAvg,
|
||||
}
|
||||
|
||||
g.usageStats = usageStats{}
|
||||
|
||||
return metrics, nil
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user