Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
Signed-off-by: gajibade <[email protected]>
  • Loading branch information
gajibade authored and graceajibade committed Dec 4, 2024
1 parent 1a4ac81 commit 5938f07
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/common/telemetry/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 5938f07

Please sign in to comment.