From 0ce122ba8e87df1529af03ed5dffa8f9699bad26 Mon Sep 17 00:00:00 2001 From: gajibade Date: Fri, 29 Nov 2024 09:51:34 +0000 Subject: [PATCH] Clean up Signed-off-by: gajibade --- pkg/common/telemetry/metrics.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/common/telemetry/metrics.go b/pkg/common/telemetry/metrics.go index ecea4947f70..6a2032f370d 100644 --- a/pkg/common/telemetry/metrics.go +++ b/pkg/common/telemetry/metrics.go @@ -121,7 +121,7 @@ func (m *MetricsImpl) ListenAndServe(ctx context.Context) error { func (m *MetricsImpl) SetGauge(key []string, val float32) { if m.enableTrustDomainLabel { - m.SetGaugeWithLabels(key, val, []Label{}) + m.SetGaugeWithLabels(key, val, nil) } else { for _, s := range m.metricsSinks { s.SetGauge(key, val) @@ -149,7 +149,7 @@ func (m *MetricsImpl) EmitKey(key []string, val float32) { func (m *MetricsImpl) IncrCounter(key []string, val float32) { if m.enableTrustDomainLabel { - m.IncrCounterWithLabels(key, val, []Label{}) + m.IncrCounterWithLabels(key, val, nil) } else { for _, s := range m.metricsSinks { s.IncrCounter(key, val) @@ -171,7 +171,7 @@ func (m *MetricsImpl) IncrCounterWithLabels(key []string, val float32, labels [] func (m *MetricsImpl) AddSample(key []string, val float32) { if m.enableTrustDomainLabel { - m.AddSampleWithLabels(key, val, []Label{}) + m.AddSampleWithLabels(key, val, nil) } else { for _, s := range m.metricsSinks { s.AddSample(key, val) @@ -193,7 +193,7 @@ func (m *MetricsImpl) AddSampleWithLabels(key []string, val float32, labels []La func (m *MetricsImpl) MeasureSince(key []string, start time.Time) { if m.enableTrustDomainLabel { - m.MeasureSinceWithLabels(key, start, []Label{}) + m.MeasureSinceWithLabels(key, start, nil) } else { for _, s := range m.metricsSinks { s.MeasureSince(key, start)