Skip to content

feat: Add Throughput and Lag Metrics Per Topic - #21

Merged
ThomasHartDev merged 1 commit into
mainfrom
thomas/feat/metrics
Sep 4, 2026
Merged

feat: Add Throughput and Lag Metrics Per Topic#21
ThomasHartDev merged 1 commit into
mainfrom
thomas/feat/metrics

Conversation

@ThomasHartDev

Copy link
Copy Markdown
Owner

Operators live on two numbers: how far a consumer is behind the log, and how fast the topic is moving. This adds TopicMetrics for that.

produced appends a 0-based offset. consumed advances that consumer's commit. Lag is logEndOffset minus committedOffset, so billing and search on the same topic can report different lag and different oldest-message age. Produce and consume rates are a sliding window of circular time buckets. A burst that then goes quiet reports 0 without wiping the lifetime offsets.

Puts the DeadLetterQueue re-exports back on the package barrel. The work-queue merge dropped them and typecheck has been failing the existing DLQ tests.

Closes #20.

TopicMetrics records produced and consumed against a topic. Lag is
log end offset minus the consumer's committed offset. Rates use a
sliding window of circular time buckets.

Restores DeadLetterQueue barrel exports dropped by the work-queue merge.
@ThomasHartDev
ThomasHartDev merged commit df5d5e0 into main Sep 4, 2026
@ThomasHartDev
ThomasHartDev deleted the thomas/feat/metrics branch September 4, 2026 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Throughput and lag metrics per topic

1 participant