Skip to content

Commit

Permalink
fix(rabbitmq): fix concurrent map error
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengbo committed Sep 23, 2024
1 parent ab973f8 commit 9463952
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/plugins/inputs/rabbitmq/input.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,9 @@ type MetricFunc func(n *Input)

func (ipt *Input) getMetric() {
ipt.start = time.Now()
getFunc := []MetricFunc{getOverview, getNode, getQueues, getExchange}
// get overview first, to get cluster name
getOverview(ipt)
getFunc := []MetricFunc{getNode, getQueues, getExchange}
g := goroutine.NewGroup(goroutine.Option{Name: "inputs_rabbitmq"})
for _, v := range getFunc {
func(gf MetricFunc) {
Expand Down

0 comments on commit 9463952

Please sign in to comment.