-
Notifications
You must be signed in to change notification settings - Fork 33
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
add clustering_max_lag to /metrics #805
base: main
Are you sure you want to change the base?
Conversation
writer.write({name: "clustering_max_lag", | ||
value: Config.instance.clustering_max_lag, | ||
type: "gauge", | ||
help: "Max unsynced replicated messages"}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WDYT?
help: "Max unsynced replicated messages"}) | |
help: "Maximum allowed unsynced replicated messages"}) |
Also, here it says "actions"
Line 58 in a05fb6b
property clustering_max_lag = 8192 # number of clustering actions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just copied the text from here https://github.com/cloudamqp/lavinmq/blob/main/src/lavinmq/config.cr#L136 🙈
But yeah, we should be consistent!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe easiest to update the comment then, hehe :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah :)
Hmm, this all might be a little confusing. clustering_max_lag
is the maximum number of actions that a follower can lag behind, but the lag
we show in GUI/metrics is how many actual bytes the follower is lagging behind. So the numbers don't really have much to do with each other... 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree that it can be confusing. Could we name it something like max_allowed_cluster_actions, and let lag be lag_bytes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it might be reasonable to rename at least one of them.
Maybe rename
lag
-> lag_in_bytes
,
max_lag
-> max_lag_in_actions
,
and add lag_in_actions
🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-authored-by: Patrik Ragnarsson <[email protected]>
WHAT is this pull request doing?
Adds
clustering_max_lag
to prometheus metricsHOW can this pull request be tested?
curl http://guest:guest@localhost:15672/metrics