Skip to content

feat(puller): add pullsync rate metric - #5552

Open
akrem-chabchoub wants to merge 1 commit into
masterfrom
pullsync-metrics
Open

feat(puller): add pullsync rate metric#5552
akrem-chabchoub wants to merge 1 commit into
masterfrom
pullsync-metrics

Conversation

@akrem-chabchoub

@akrem-chabchoub akrem-chabchoub commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Checklist

  • I have read the coding guide.
  • My change requires a documentation update, and I have done it.
  • I have added tests to cover my changes.
  • I have filled out the description and linked the related issues.

Description

The bee node shrinks its storage radius only when historical syncing has fully stopped (SyncRate() == 0). Until now, we couldn't see that sync rate anywhere, so when the radius didn't decrease, we couldn't tell why, or how close it was to happening.

With this change, we expose that number as bee_puller_pullsync_rate.

Now we can put it on a dashboard and watch the story unfold: the rate is high while we catch up on history → it decays to 0 when syncing finishes → and the moment it hits 0, our radius is allowed to step down. With this metric, we make the previously invisible condition that controls radius decrease visible.

Open API Spec Version Changes (if applicable)

Motivation and Context (Optional)

Related Issue (Optional)

Screenshots (if appropriate):

AI Disclosure

  • This PR contains code that has been generated by an LLM.
  • I have reviewed the AI generated code thoroughly.
  • I possess the technical expertise to responsibly review the code generated in this PR.

@akrem-chabchoub akrem-chabchoub self-assigned this Jul 31, 2026
@martinconic

Copy link
Copy Markdown
Contributor

Please add a description

@acud acud left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm, just that you can still see the rate of historical syncing by looking at the metric of synced chunks, there's a label historical that shows you the number of chunks arriving from historical syncing, which is in fact a proxy to this measurement. either way it is fine from my side to expose this metric.

Comment thread pkg/puller/metrics.go
Name: "max_uint_errors",
Help: "Total max uint errors.",
}),
PullsyncRate: prometheus.NewGaugeFunc(prometheus.GaugeOpts{

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should the name be HistoricalSyncRate, because it doesn't count live syncing?

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.

5 participants