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

[v23.3.x] metrics: fix kafka_max_offset on read replicas #16272

Conversation

vbotbuildovich
Copy link
Collaborator

Backport of PR #16263
Fixes: #16271,

Updates the filter used when collecting metrics samples.

In some cases, the samples take the form:

Sample(name='redpanda_kafka_max_offset', labels={'redpanda_namespace': 'kafka', 'redpanda_partition': '5', 'redpanda_topic': 'panda-topic'}, value=0.0, ...

(cherry picked from commit e567d63)
Read replicas were previously translating their own local log offsets to
return `redpanda_kafka_max_offset` to the metrics endpoint. This is
different from how read replicas calculate the HWM when returning to the
Kafka endpoint, which just goes directly to cloud storage.

This adds the same read replica check that we have in the Kafka layer.

(cherry picked from commit 7e33cc7)
@vbotbuildovich vbotbuildovich added this to the v23.3.x-next milestone Jan 24, 2024
@vbotbuildovich vbotbuildovich added the kind/backport PRs targeting a stable branch label Jan 24, 2024
Copy link
Contributor

@andrwng andrwng left a comment

Choose a reason for hiding this comment

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

Clean backport

@piyushredpanda piyushredpanda merged commit 4a2bed2 into redpanda-data:v23.3.x Jan 25, 2024
18 of 19 checks passed
@piyushredpanda piyushredpanda modified the milestones: v23.3.x-next, v23.3.6 Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/redpanda kind/backport PRs targeting a stable branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants