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

backupccl: add telemetry #46716

Merged
merged 2 commits into from
Mar 30, 2020
Merged

backupccl: add telemetry #46716

merged 2 commits into from
Mar 30, 2020

Conversation

dt
Copy link
Member

@dt dt commented Mar 30, 2020

This adds counters to usage of various features of BACKUP and RESTORE:

  • if encryption is used
  • if full-cluster is used
  • if incremental is used, either explicitly or automatically
  • total, succeeded and failed counts as well as runtime, size and throughput

These should help us measure how BACKUP and RESTORE are used and are behaving in the wild and where to direct our future efforts.

Fixes #46518
Fixes #46520
Fixes #46521

Release note (enterprise change): BACKUP and RESTORE now collect some anonymous telemetry on throughput and feature usage.

Release justification: low-risk, high impact.

@dt dt requested review from pbardea and mwang1026 March 30, 2020 03:21
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@dt dt force-pushed the backup-telemetry branch from 00c50e8 to 8f598e0 Compare March 30, 2020 03:28
Release note: none.

Release justification: extremely minor change.
@dt dt force-pushed the backup-telemetry branch 2 times, most recently from 50634ed to 674c190 Compare March 30, 2020 14:35
Copy link
Contributor

@pbardea pbardea left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 2 files at r1, 4 of 4 files at r2.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @dt and @mwang1026)


pkg/ccl/backupccl/backup_job.go, line 580 at r2 (raw file):

			telemetry.CountBucketed("backup.size-mb.inc", sizeMb)
			telemetry.CountBucketed("backup.speed-mbps.inc.total", mbps)
			telemetry.CountBucketed("backup.speed-mbps.full.per-node", mbps/int64(numClusterNodes))

Should this be backup.speed-mbps.inc.per-node? (s/full/inc/)


pkg/ccl/backupccl/backup_job.go, line 608 at r2 (raw file):

func (b *backupResumer) OnFailOrCancel(ctx context.Context, phs interface{}) error {
	telemetry.Count("backup.total.failed")
	telemetry.CountBucketed("backup.duration-sec.failed",

Similarly to my previous comment, is it interesting to consider which types of backups are failing/being cancelled. It would also be nice if there was a way to differentiate between failing and cancelling...


pkg/ccl/backupccl/restore_job.go, line 1125 at r2 (raw file):

// change stuff to delete the keys in the background.
func (r *restoreResumer) OnFailOrCancel(ctx context.Context, phs interface{}) error {
	telemetry.Count("restore.total.failed")

Would it be useful to track how many of the failed restores were full-cluster vs not? (Since w'ere tracking the percentage of restores that are full cluster restores.)

This adds counters to usage of various features of BACKUP and RESTORE:
 - if encryption is used
 - if full-cluster is used
 - if incremental is used, either explicitly or automatically
 - total, succeeded and failed counts as well as runtime, size and throughput

These should help us measure how BACKUP and RESTORE are used and are behaving in the wild
and where to direct our future efforts.

Release note (enterprise change): BACKUP and RESTORE now collect some anonymous telemetry on throughput and feature usage.

Release justification: low-risk, high impact.
@dt dt force-pushed the backup-telemetry branch from 674c190 to cd1b236 Compare March 30, 2020 16:17
Copy link
Member Author

@dt dt left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @mwang1026 and @pbardea)


pkg/ccl/backupccl/backup_job.go, line 580 at r2 (raw file):

Previously, pbardea (Paul Bardea) wrote…

Should this be backup.speed-mbps.inc.per-node? (s/full/inc/)

Done.


pkg/ccl/backupccl/backup_job.go, line 608 at r2 (raw file):

Previously, pbardea (Paul Bardea) wrote…

Similarly to my previous comment, is it interesting to consider which types of backups are failing/being cancelled. It would also be nice if there was a way to differentiate between failing and cancelling...

Agreed, though I think those would be in addition to the top level count, so I'm inclined to proceed with this for now (in the interest of making 20.1 branch cut) and add that later.


pkg/ccl/backupccl/restore_job.go, line 1125 at r2 (raw file):

Previously, pbardea (Paul Bardea) wrote…

Would it be useful to track how many of the failed restores were full-cluster vs not? (Since w'ere tracking the percentage of restores that are full cluster restores.)

ditto above.

Also, to act on that info, we'd probably need more info about the actual failure too, so we might need to rely on bug reports here for now.

Copy link
Contributor

@pbardea pbardea left a comment

Choose a reason for hiding this comment

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

LGTM

@dt
Copy link
Member Author

dt commented Mar 30, 2020

TFTR!

bors r+

@craig
Copy link
Contributor

craig bot commented Mar 30, 2020

Build failed (retrying...)

@craig
Copy link
Contributor

craig bot commented Mar 30, 2020

Build succeeded

@craig craig bot merged commit f5ebd5e into cockroachdb:master Mar 30, 2020
@dt dt deleted the backup-telemetry branch March 31, 2020 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants