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 Mar 25, 2024
1 parent bdbb6e1 commit fbe1371
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 fbe1371

Please sign in to comment.