[v26.1.x] ct: reconcilation pending offset lag metric#30345
Open
vbotbuildovich wants to merge 2 commits intoredpanda-data:v26.1.xfrom
Open
[v26.1.x] ct: reconcilation pending offset lag metric#30345vbotbuildovich wants to merge 2 commits intoredpanda-data:v26.1.xfrom
ct: reconcilation pending offset lag metric#30345vbotbuildovich wants to merge 2 commits intoredpanda-data:v26.1.xfrom
Conversation
Add a `source_probe` class that registers a pending_offset_lag gauge per partition, labeled with namespace/topic/partition. The probe is owned by the source base class and its metric lifecycle follows the source's. The gauge invokes the source's `pending_offset_lag()` calculation on scrape via a back-reference, so the metric always reflects current state without requiring explicit updates each reconciliation tick. Also add `pending_offset_lag()` as a virtual method on the source interface, implemented in `l0_source` as `LSO - next_offset(LRO)`. (cherry picked from commit bdd6465)
Add `pending_offset_lag()` to fake_source and two test cases: `PendingOffsetLag` verifies the metric reflects pending offsets immediately when data arrives and drops to zero after reconciliation. `PendingOffsetLagDetach` verifies the metric is deregistered when the source is destroyed. (cherry picked from commit b9167d1)
WillemKauf
approved these changes
Apr 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of PR #30148