-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[receiver/mysql]: add mysql.replica.time_behind_source and mysql.replica.sql_delay metrics #14790
[receiver/mysql]: add mysql.replica.time_behind_source and mysql.replica.sql_delay metrics #14790
Conversation
a3078fa
to
95e253c
Compare
switch strings.ToLower(col) { | ||
case "replica_io_state": | ||
fallthrough | ||
case "slave_io_state": | ||
dest = append(dest, &s.replicaIOState) | ||
case "source_host": | ||
fallthrough |
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.
This is to support as many different implementation as possible. I navigated three different implementations so far:
- bitnami's mysql
show slave status
- mysql documentation
show slave status
- mysql documentation
show replica status
receiver/mysqlreceiver/client.go
Outdated
// fallback to slave status | ||
query = "SHOW SLAVE STATUS" |
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.
This query and its associated metric names were deprecated in MySQL version 8.0.22, which was released 2 years ago this month. The intention to migrate away from the terminology was announced several months prior to the release.
We currently claim support for version 8.0. I think we should bump that to 8.0.22 in the documentation and not support the deprecated terminology.
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.
We have integration dockerfile for 5.7
, and also 5.7
is globally supported until october 2023. Maybe we do not claim support for it, but it is not a big cost (especially when I developed it) and some users could use it. I already used new names for metrics and structures, so there won't be any change in terminology after 5.7
eol
In addition SHOW
is not a normal SELECT
, so I think code approach shouldn't change.
I can change comment, to avoid slave
word, but I would leave support for 5.7
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.
@djaglowski WDYT?
6d93d8a
to
05ea6b9
Compare
…eplica.sql_delay metrics Signed-off-by: Dominik Rosiek <[email protected]>
05ea6b9
to
b19c140
Compare
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
Closed as inactive. Feel free to reopen if this PR is still being worked on. |
@djaglowski Could we reopen this PR? |
@sumo-drosiek, I cannot reopen the PR, but feel free to reopen as another one. |
Description:
add mysql.replica.time_behind_source and mysql.replica.sql_delay metrics
Link to tracking Issue:
#14138
Testing:
manual, unit tests
Documentation:
metadata.yaml