From fbe137191d55df737ff95dca8115fadc9fc12693 Mon Sep 17 00:00:00 2001 From: Edoardo Tenani Date: Mon, 25 Mar 2024 11:52:40 +0100 Subject: [PATCH] use attribute.Set small change to align on using attribute.Set for metrics attributes. --- plugin/kotel/meter.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugin/kotel/meter.go b/plugin/kotel/meter.go index 8232e8f1..5cfb4efb 100644 --- a/plugin/kotel/meter.go +++ b/plugin/kotel/meter.go @@ -255,20 +255,20 @@ func (m *Meter) OnBrokerConnect(meta kgo.BrokerMetadata, _ time.Duration, _ net. m.instruments.connects.Add( context.Background(), 1, - metric.WithAttributes( + metric.WithAttributeSet(attribute.NewSet( attribute.String("node_id", node), attribute.String("outcome", "failure"), - ), + )), ) return } m.instruments.connects.Add( context.Background(), 1, - metric.WithAttributes( + metric.WithAttributeSet(attribute.NewSet( attribute.String("node_id", node), attribute.String("outcome", "success"), - ), + )), ) return }