Skip to content

Commit

Permalink
mapic/stats: Remove ugly metrics := metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
victorges committed Feb 8, 2023
1 parent a6a67fe commit 0ac9aeb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions internal/app/mistapiconnector/stats_collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ func (c *metricsCollector) collectMetrics(ctx context.Context) error {
continue
}

metrics := metrics
eg.Go(recovered(func() {
info.mu.Lock()
timeSinceBumped := time.Since(info.lastSeenBumpedAt)
Expand All @@ -110,8 +109,8 @@ func (c *metricsCollector) collectMetrics(ctx context.Context) error {
info.mu.Unlock()
}))

mseEvent := createMetricsEvent(c.nodeID, c.ownRegion, info, metrics)
eg.Go(recovered(func() {
mseEvent := createMetricsEvent(c.nodeID, c.ownRegion, info, metrics)
err = c.producer.Publish(ctx, event.AMQPMessage{
Exchange: c.amqpExchange,
Key: fmt.Sprintf("stream.metrics.%s", info.stream.ID),
Expand Down

0 comments on commit 0ac9aeb

Please sign in to comment.