Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[rabbitmq] Emit head_message_timestamp metric when available #11474

Closed
philomory opened this issue Jul 7, 2022 · 1 comment · Fixed by #11475
Closed

[rabbitmq] Emit head_message_timestamp metric when available #11474

philomory opened this issue Jul 7, 2022 · 1 comment · Fixed by #11475
Labels
feature request Requests for new plugin and for new features to existing plugins

Comments

@philomory
Copy link
Contributor

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 a head_message_timestamp field (only populated if the metric is actually available).

Optionally, a head_message_age_seconds field could also be emitted, calculated as timestamp (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 of rabbitmq_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.

@philomory philomory added the feature request Requests for new plugin and for new features to existing plugins label Jul 7, 2022
@powersj
Copy link
Contributor

powersj commented Jul 8, 2022

next step: final review of #11475

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Requests for new plugin and for new features to existing plugins
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants