Skip to content

[Request] Add support for stream_consumer_max_offset_lag metric from RabbitMQ Prometheus exporter #19961

Open
@pad-master82

Description

@pad-master82

Summary

A new Prometheus metric has been added to RabbitMQ in rabbitmq-server#12765:
stream_consumer_max_offset_lag

This metric is available starting with RabbitMQ 4.0.5, and it represents the maximum offset lag per stream consumer.

Why it matters

In stream-based workloads, tracking consumer lag is critical for:

Identifying slow or stalled consumers

Ensuring real-time processing requirements are met

Troubleshooting throughput bottlenecks

This metric is especially important for teams using RabbitMQ Streams, which is a newer messaging paradigm in RabbitMQ.

Proposal

If possible, it would be great to support this metric in the RabbitMQ OpenMetrics integration.

From looking at the code, maybe it’s as simple as adding the following entry to the _GAUGES list in metrics.py:

_GAUGES = [
    ...
    "rabbitmq_stream_consumer_max_offset_lag": "stream.consumer_max_offset_lag",
]

References

Prometheus metric: stream_consumer_max_offset_lag

Added in: RabbitMQ 4.0.5 (PR #12765)

Related documentation: RabbitMQ Streams

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions