Skip to content
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

Conversation

sumo-drosiek
Copy link
Member

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

@sumo-drosiek sumo-drosiek requested a review from a team October 10, 2022 12:05
@sumo-drosiek sumo-drosiek force-pushed the drosiek-mysql-slave-metrics branch from a3078fa to 95e253c Compare October 10, 2022 12:05
Comment on lines +253 to +259
switch strings.ToLower(col) {
case "replica_io_state":
fallthrough
case "slave_io_state":
dest = append(dest, &s.replicaIOState)
case "source_host":
fallthrough
Copy link
Member Author

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

@sumo-drosiek sumo-drosiek changed the title feat(mysqlreceiver): add mysql.replica.time_behind_source and mysql.replica.sql_delay metrics [receiver/mysql]: add mysql.replica.time_behind_source and mysql.replica.sql_delay metrics Oct 10, 2022
Comment on lines 234 to 235
// fallback to slave status
query = "SHOW SLAVE STATUS"
Copy link
Member

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.

Copy link
Member Author

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@djaglowski WDYT?

@sumo-drosiek sumo-drosiek force-pushed the drosiek-mysql-slave-metrics branch 2 times, most recently from 6d93d8a to 05ea6b9 Compare October 11, 2022 06:55
…eplica.sql_delay metrics

Signed-off-by: Dominik Rosiek <[email protected]>
@github-actions
Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added Stale and removed Stale labels Oct 26, 2022
@github-actions
Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Nov 16, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Dec 1, 2022

Closed as inactive. Feel free to reopen if this PR is still being worked on.

@github-actions github-actions bot closed this Dec 1, 2022
@sumo-drosiek
Copy link
Member Author

@djaglowski Could we reopen this PR?

@djaglowski
Copy link
Member

@sumo-drosiek, I cannot reopen the PR, but feel free to reopen as another one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants