Skip to content

Commit

Permalink
use attribute.Set
Browse files Browse the repository at this point in the history
small change to align on using attribute.Set for metrics
attributes.
  • Loading branch information
endorama committed Jun 5, 2024
1 parent ac43475 commit 7e7b669
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions plugin/kotel/meter.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 7e7b669

Please sign in to comment.