Emit binlog backlog metrics#39
Merged
Merged
Conversation
f67a1c9 to
941650e
Compare
a268db3 to
fdce897
Compare
grodowski
approved these changes
May 28, 2026
| emit.Gauge("binlog.backlog_utilization", binlogBacklogUtilization(backlogSize, backlogCapacity)) | ||
| } | ||
|
|
||
| func binlogBacklogUtilization(backlogSize, backlogCapacity int) float64 { |
Member
There was a problem hiding this comment.
How useful is this, assuming we can get a similar result with a custom metric definition? (YAGNI?)
Author
There was a problem hiding this comment.
yeah I thought a bit about this one whether to leave it or not. I think we may not use it, other folks may, so I decided to leave it in
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.
Related issue: github#1672
Closes: https://github.com/Shopify/schema-migrations/issues/5454
Description
This PR emits binlog backlog metrics in order to see how much back pressure exists for the binlog channel:
binlog.backlog_sizebinlog.backlog_capacitybinlog.backlog_utilizationThis can be visualized as the

binlog apply queuepanel belowscript/cibuildreturns with no formatting errors, build errors or unit test errors.