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

go/vt/mysqlctl/backup.go: add backup/restore duration stats #7512

Merged
merged 1 commit into from
Feb 18, 2021

Conversation

guidoiaquinti
Copy link
Member

Description

Add metrics to track backup/restore operations duration.

Related Issue(s)

N/A

Checklist

  • Should this PR be backported?
  • Tests were added or are not required
  • Documentation was added or is not required

Impacted Areas in Vitess

Components that this PR will affect:

  • Query Serving
  • VReplication
  • Cluster Management
  • Build/CI
  • VTAdmin

Test

Before

vitess@47039963e297:/vt/src/vitess.io/vitess/examples/local$ curl -i -s localhost:15101/metrics | grep vttablet_backup
# HELP vttablet_backup_duration_seconds How long it took to complete the last backup operation (in seconds)
# TYPE vttablet_backup_duration_seconds gauge
vttablet_backup_duration_seconds 0
vitess@47039963e297:/vt/src/vitess.io/vitess/examples/local$ vtctlclient Backup zone1-0000000101
I0218 12:55:41.952392   48318 main.go:67] I0218 12:55:41.951644 backup.go:163] I0218 12:55:41.947789 builtinbackupengine.go:141] Hook: , Compress: true
I0218 12:55:41.952878   48318 main.go:67] I0218 12:55:41.951707 backup.go:163] I0218 12:55:41.950990 builtinbackupengine.go:151] getting current replication status
I0218 12:55:41.961514   48318 main.go:67] I0218 12:55:41.960952 backup.go:163] I0218 12:55:41.960720 builtinbackupengine.go:192] using replication position: 41d2b95c-71e8-11eb-a990-0242ac110002:1-20
[...]

After

# HELP vttablet_backup_duration_seconds How long it took to complete the last backup operation (in seconds)
# TYPE vttablet_backup_duration_seconds gauge
vttablet_backup_duration_seconds 5

Signed-off-by: Guido Iaquinti <giaquinti@slack-corp.com>
Copy link
Member

@deepthi deepthi left a comment

Choose a reason for hiding this comment

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

LGTM

@deepthi deepthi merged commit b40fe32 into vitessio:master Feb 18, 2021
@askdba askdba added this to the v10.0 milestone Feb 22, 2021
@guidoiaquinti guidoiaquinti deleted the backup_restore_metrics branch April 12, 2021 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants