[rabbitmq] Emit head_message_timestamp
metric when available
#11474
Labels
feature request
Requests for new plugin and for new features to existing plugins
Feature Request
The RabbitMQ plugin should support emitting the
head_message_timestamp
metrics provided for queues by the API, if/when it is available from the broker.I am preparing a PR to add this functionality; part of the contribution guidelines for making a PR suggests opening an issue first, so, I am doing so here.
Proposal:
The
rabbitmq_queue
metric should include ahead_message_timestamp
field (only populated if the metric is actually available).Optionally, a
head_message_age_seconds
field could also be emitted, calculated astimestamp (in seconds) - head_message_timestamp
. Practically speaking, this is almost always what you actually want to measure, though of course, this could be calculated after the fact using e.g. a Starlark processor, or a Task in InfluxDB.Current behavior:
The
head_message_timestamp
field is never emitted as a metric.Desired behavior:
The
head_message_timestamp
is emitted as a field ofrabbitmq_queue
when available.Use case:
Knowing the timestamp/age of the head message in a queue (which is generally the oldest message in that queue) is absolutely invaluable as a measurement of queue consumer performance, since it allows you to answer the question, "how long does it take for messages to move through the queue?". While in principle this sort of metric can be emitted by the consuming application, the fact that it is often already available at the broker provides an easy way to collect a relevant metric from every queue, regardless of who (if anyone!) is consuming that queue.
The text was updated successfully, but these errors were encountered: