Skip to content
This repository has been archived by the owner on Mar 17, 2024. It is now read-only.

Capture earliest available offset for topics #67

Closed
graphex opened this issue Sep 21, 2019 · 2 comments · Fixed by #86
Closed

Capture earliest available offset for topics #67

graphex opened this issue Sep 21, 2019 · 2 comments · Fixed by #86
Labels
enhancement New feature or request

Comments

@graphex
Copy link
Contributor

graphex commented Sep 21, 2019

Sometimes the best metric for alerting purposes is the percent of the currently available offset range that the lag represents, i.e. OffsetLagMetric / (LatestOffsetMetric - EarliestOffsetMetric). In order to have this available, capture of the earliest offsets for a topic partition needs to be added. In the future, this could also be used to report the estimated retention period for a topic, so that if you've specified retention.bytes you could get a reasonable estimate of the number of seconds it takes to hit the specified byte size of the log.

I'm working on a PR for capturing and reporting EarliestOffsetMetric now, though I'm not tackling the seconds estimation piece yet.

@seglo
Copy link
Owner

seglo commented Sep 21, 2019

@graphex That's an interesting deriative metric. If your lag is close to your available offset range that would have obvious consequences for message delivery guarantees. It would be interesting to see how it could be used to tune retention period for a topic automatically. WDYT of reporting the derivative metric (OffsetLagMetric / (LatestOffsetMetric - EarliestOffsetMetric)) versus just the beginning offset? Is the beginning offset metric useful onits own?

@seglo seglo added the enhancement New feature or request label Sep 21, 2019
@graphex
Copy link
Contributor Author

graphex commented Sep 21, 2019

I think the earliest offset is useful on its own for graph display and such. It seems like #71 is the most critical next step, but after getting that, I think adding the a few derivative metrics makes sense. I'll outline those in another issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
2 participants