Skip to content

Commit

Permalink
Disable end-to-end latency metric due to performance
Browse files Browse the repository at this point in the history
  • Loading branch information
mkuratczyk committed Feb 14, 2024
1 parent c1b540b commit 977dd00
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/amqp10_client/consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ func (c Amqp10Consumer) Start(ctx context.Context, subscribed chan bool) {
close(subscribed)
log.Debug("consumer subscribed", "protocol", "amqp-1.0", "consumerId", c.Id, "terminus", c.Topic, "durability", durability)

m := metrics.EndToEndLatency.With(prometheus.Labels{"protocol": "amqp-1.0"})
// TODO: disabled due to performance issues
// m := metrics.EndToEndLatency.With(prometheus.Labels{"protocol": "amqp-1.0"})

log.Info("consumer started", "protocol", "amqp-1.0", "consumerId", c.Id, "terminus", c.Topic)

Expand All @@ -89,7 +90,7 @@ func (c Amqp10Consumer) Start(ctx context.Context, subscribed chan bool) {
}

payload := msg.GetData()
m.Observe(utils.CalculateEndToEndLatency(c.Config.UseMillis, &payload))
// m.Observe(utils.CalculateEndToEndLatency(c.Config.UseMillis, &payload))

log.Debug("message received", "protocol", "amqp-1.0", "consumerId", c.Id, "terminus", c.Topic, "size", len(payload))

Expand Down

0 comments on commit 977dd00

Please sign in to comment.