Skip to content

Commit 7cb2fd7

Browse files
committed
Reset gauge on refresh
1 parent 65b78e8 commit 7cb2fd7

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

backend/pkg/metrics/metrics.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,9 @@ func RegisterAndInstrument(api *api.API) error {
156156

157157
// calculateMetrics calculates the application metrics and updates the respective metric.
158158
func calculateMetrics(api *api.API) error {
159+
// reset instance stats on each refresh
160+
latestInstanceStatsGaugeMetric.Reset()
161+
159162
aipcMetrics, err := api.GetAppInstancesPerChannelMetrics()
160163
if err != nil {
161164
return fmt.Errorf("failed to get app instances per channel metrics: %w", err)

0 commit comments

Comments
 (0)