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

feat(inputs.rabbitmq): add support for head_message_timestamp metric #11475

Merged

Conversation

philomory
Copy link
Contributor

Required for all PRs:

resolves #11474

Adds support for the head_message_timestamp field to the rabbitmq_queue metric.

Note: This metric is only available from the API if there are messages in the queue, held in-memory by the broker, which have their timestamp metadata property set. The timestamp property can be set manually at time of message publication by the publisher, or it can be set automatically by the rabbitmq_message_timestamp plugin. Because the broker will not page messages in from disk just to read their timestamp, this metric is notably never present at the API for "lazy" queues (for which all messages are stored on disk and only loaded into memory briefly when a consumer grabs them). In cases where the head_message_timestamp field from the API is null, the head_message_timestamp field of the rabbitmq_queue measurement will simply be omitted.

@telegraf-tiger telegraf-tiger bot added the feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin label Jul 7, 2022
@philomory philomory changed the title feat(rabbitmq): add support for head_message_timestamp metric feat(rabbitmq): add support for head_message_timestamp metric Jul 7, 2022
@philomory philomory changed the title feat(rabbitmq): add support for head_message_timestamp metric feat(inputs.rabbitmq): add support for head_message_timestamp metric Jul 8, 2022
Copy link
Contributor

@powersj powersj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the bug + PR outlining the purpose of this. This looks fine for adding an optional field for your use case.

@powersj powersj added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Jul 8, 2022
Copy link
Member

@srebhan srebhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix @philomory! Looks good to me.

@srebhan srebhan merged commit e4afb2b into influxdata:master Jul 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[rabbitmq] Emit head_message_timestamp metric when available
3 participants