-
Notifications
You must be signed in to change notification settings - Fork 4
Expose max timestamp for each topic and/or partition #3
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
Conversation
| // NB: this requires Kafka Brokers 3.0+ (see https://issues.apache.org/jira/browse/KAFKA-12541) | ||
| // In older versions this is returning the timestamp of the low watermarks (earliest offset) | ||
| maxTimestampOffsets, err := e.minionSvc.ListOffsetsCached(ctx, -3) | ||
| if err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are we expecting an error for brokers with version < 3.0.0 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not an error but incorrect results:
"""In older versions this is returning the timestamp of the low watermarks (earliest offset)"""
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the clarification.
alexander-falca
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor question and then
Kafka 3.0+ added support to fetch offset with the max timestamp. This is useful in monitoring the steady progress of producing to a topic/partion but also to detect very high timestamps in the topic that can stuck topic retention. This patch adds two new metrics: - kafka_topic_partition_max_timestamp: for each topic partition reports the max timestamp in that partition - kafka_topic_max_timestamp: for each topic reports the max timestamp in that topic, computed as the maximum timestamp across partitions See: - https://issues.apache.org/jira/browse/KAFKA-12541 - https://cwiki.apache.org/confluence/display/KAFKA/KIP-734%3A+Improve+AdminClient.listOffsets+to+return+timestamp+and+offset+for+the+record+with+the+largest+timestamp
* Expose max timestamp for each topic and/or partition Kafka 3.0+ added support to fetch offset with the max timestamp. This is useful in monitoring the steady progress of producing to a topic/partion but also to detect very high timestamps in the topic that can stuck topic retention. This patch adds two new metrics: - kafka_topic_partition_max_timestamp: for each topic partition reports the max timestamp in that partition - kafka_topic_max_timestamp: for each topic reports the max timestamp in that topic, computed as the maximum timestamp across partitions See: - https://issues.apache.org/jira/browse/KAFKA-12541 - https://cwiki.apache.org/confluence/display/KAFKA/KIP-734%3A+Improve+AdminClient.listOffsets+to+return+timestamp+and+offset+for+the+record+with+the+largest+timestamp * Update prometheus/collect_topic_partition_offsets.go
* Expose max timestamp for each topic and/or partition Kafka 3.0+ added support to fetch offset with the max timestamp. This is useful in monitoring the steady progress of producing to a topic/partion but also to detect very high timestamps in the topic that can stuck topic retention. This patch adds two new metrics: - kafka_topic_partition_max_timestamp: for each topic partition reports the max timestamp in that partition - kafka_topic_max_timestamp: for each topic reports the max timestamp in that topic, computed as the maximum timestamp across partitions See: - https://issues.apache.org/jira/browse/KAFKA-12541 - https://cwiki.apache.org/confluence/display/KAFKA/KIP-734%3A+Improve+AdminClient.listOffsets+to+return+timestamp+and+offset+for+the+record+with+the+largest+timestamp * Update prometheus/collect_topic_partition_offsets.go
* Expose max timestamp for each topic and/or partition Kafka 3.0+ added support to fetch offset with the max timestamp. This is useful in monitoring the steady progress of producing to a topic/partion but also to detect very high timestamps in the topic that can stuck topic retention. This patch adds two new metrics: - kafka_topic_partition_max_timestamp: for each topic partition reports the max timestamp in that partition - kafka_topic_max_timestamp: for each topic reports the max timestamp in that topic, computed as the maximum timestamp across partitions See: - https://issues.apache.org/jira/browse/KAFKA-12541 - https://cwiki.apache.org/confluence/display/KAFKA/KIP-734%3A+Improve+AdminClient.listOffsets+to+return+timestamp+and+offset+for+the+record+with+the+largest+timestamp * Update prometheus/collect_topic_partition_offsets.go
* Expose max timestamp for each topic and/or partition Kafka 3.0+ added support to fetch offset with the max timestamp. This is useful in monitoring the steady progress of producing to a topic/partion but also to detect very high timestamps in the topic that can stuck topic retention. This patch adds two new metrics: - kafka_topic_partition_max_timestamp: for each topic partition reports the max timestamp in that partition - kafka_topic_max_timestamp: for each topic reports the max timestamp in that topic, computed as the maximum timestamp across partitions See: - https://issues.apache.org/jira/browse/KAFKA-12541 - https://cwiki.apache.org/confluence/display/KAFKA/KIP-734%3A+Improve+AdminClient.listOffsets+to+return+timestamp+and+offset+for+the+record+with+the+largest+timestamp * Update prometheus/collect_topic_partition_offsets.go
* Expose max timestamp for each topic and/or partition Kafka 3.0+ added support to fetch offset with the max timestamp. This is useful in monitoring the steady progress of producing to a topic/partion but also to detect very high timestamps in the topic that can stuck topic retention. This patch adds two new metrics: - kafka_topic_partition_max_timestamp: for each topic partition reports the max timestamp in that partition - kafka_topic_max_timestamp: for each topic reports the max timestamp in that topic, computed as the maximum timestamp across partitions See: - https://issues.apache.org/jira/browse/KAFKA-12541 - https://cwiki.apache.org/confluence/display/KAFKA/KIP-734%3A+Improve+AdminClient.listOffsets+to+return+timestamp+and+offset+for+the+record+with+the+largest+timestamp * Update prometheus/collect_topic_partition_offsets.go
* Expose max timestamp for each topic and/or partition Kafka 3.0+ added support to fetch offset with the max timestamp. This is useful in monitoring the steady progress of producing to a topic/partion but also to detect very high timestamps in the topic that can stuck topic retention. This patch adds two new metrics: - kafka_topic_partition_max_timestamp: for each topic partition reports the max timestamp in that partition - kafka_topic_max_timestamp: for each topic reports the max timestamp in that topic, computed as the maximum timestamp across partitions See: - https://issues.apache.org/jira/browse/KAFKA-12541 - https://cwiki.apache.org/confluence/display/KAFKA/KIP-734%3A+Improve+AdminClient.listOffsets+to+return+timestamp+and+offset+for+the+record+with+the+largest+timestamp * Update prometheus/collect_topic_partition_offsets.go
* Expose max timestamp for each topic and/or partition Kafka 3.0+ added support to fetch offset with the max timestamp. This is useful in monitoring the steady progress of producing to a topic/partion but also to detect very high timestamps in the topic that can stuck topic retention. This patch adds two new metrics: - kafka_topic_partition_max_timestamp: for each topic partition reports the max timestamp in that partition - kafka_topic_max_timestamp: for each topic reports the max timestamp in that topic, computed as the maximum timestamp across partitions See: - https://issues.apache.org/jira/browse/KAFKA-12541 - https://cwiki.apache.org/confluence/display/KAFKA/KIP-734%3A+Improve+AdminClient.listOffsets+to+return+timestamp+and+offset+for+the+record+with+the+largest+timestamp * Update prometheus/collect_topic_partition_offsets.go
* Expose max timestamp for each topic and/or partition Kafka 3.0+ added support to fetch offset with the max timestamp. This is useful in monitoring the steady progress of producing to a topic/partion but also to detect very high timestamps in the topic that can stuck topic retention. This patch adds two new metrics: - kafka_topic_partition_max_timestamp: for each topic partition reports the max timestamp in that partition - kafka_topic_max_timestamp: for each topic reports the max timestamp in that topic, computed as the maximum timestamp across partitions See: - https://issues.apache.org/jira/browse/KAFKA-12541 - https://cwiki.apache.org/confluence/display/KAFKA/KIP-734%3A+Improve+AdminClient.listOffsets+to+return+timestamp+and+offset+for+the+record+with+the+largest+timestamp * Update prometheus/collect_topic_partition_offsets.go
Description
Kafka 3.0+ added support to fetch offset with the max timestamp.
This is useful in monitoring the steady progress of producing to a topic/partion
but also to detect very high timestamps in the topic that can stuck topic retention.
This patch adds two new metrics:
kafka_topic_partition_max_timestamp: for each topic partition reports the max timestamp in that partitionkafka_topic_max_timestamp: for each topic reports the max timestamp in that topic, computed as the maximum timestamp across partitionsSee:
Types of changes
Checklist: