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

Report a metric for the size of gappy state blocks #194

Merged
merged 3 commits into from
Jul 10, 2023

Conversation

DMRobertson
Copy link
Contributor

@DMRobertson DMRobertson commented Jul 10, 2023

Sanity-checked that this worked by running TestGappyState and polling metrics:

$ curl -s localhost:6060/metrics | grep gappy
# HELP sliding_sync_poller_gappy_state_size Number of events in a state block during a sync v2 gappy sync
# TYPE sliding_sync_poller_gappy_state_size histogram
sliding_sync_poller_gappy_state_size_bucket{le="1"} 1
sliding_sync_poller_gappy_state_size_bucket{le="10"} 1
sliding_sync_poller_gappy_state_size_bucket{le="100"} 1
sliding_sync_poller_gappy_state_size_bucket{le="1000"} 1
sliding_sync_poller_gappy_state_size_bucket{le="10000"} 1
sliding_sync_poller_gappy_state_size_bucket{le="+Inf"} 1
sliding_sync_poller_gappy_state_size_sum 1
sliding_sync_poller_gappy_state_size_count 1

David Robertson added 2 commits July 10, 2023 14:26
otherwise we only see the error message if we're using sentry.
@DMRobertson DMRobertson force-pushed the dmr/metric-for-gappy-state branch from 357d2e8 to 5064f64 Compare July 10, 2023 13:26
@DMRobertson DMRobertson marked this pull request as ready for review July 10, 2023 13:57
@@ -741,3 +755,10 @@ func (p *poller) trackTimelineSize(size int, limited bool) {
}
p.timelineSizeVec.WithLabelValues(label).Observe(float64(size))
}

func (p *poller) trackGappyStateSize(size int) {
Copy link
Member

Choose a reason for hiding this comment

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

You never call this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

🤦 committed locally but not pushed.

@DMRobertson DMRobertson merged commit ea25b81 into dmr/debug-from-stable Jul 10, 2023
@DMRobertson DMRobertson deleted the dmr/metric-for-gappy-state branch July 12, 2023 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants