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
more metrics in purger for monitoring delete requests processing progress #2730
more metrics in purger for monitoring delete requests processing progress #2730
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. LGTM, with some comments/questions.
dp.metrics.oldestPendingDeleteRequestAgeSeconds.Set(float64(now.Sub(oldestPendingRequestCreatedAt) / time.Second)) | ||
dp.metrics.pendingDeleteRequestsCount.Set(float64(pendingDeleteRequestsCount)) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will only update metrics after all delete requests have plans for them built. Is that OK?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that is the only option right now because if we change the count as we go through each delete request the partially updated value could get scraped and we would see unexpected jumps in the number of pending requests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be done by refactoring the code to find the requests to process as well as do a count of pending requests and build the plans after updating the metric. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I left a minor not. Could you also add a CHANGELOG entry, please?
…ress Signed-off-by: Sandeep Sukhani <sandeep.d.sukhani@gmail.com>
Signed-off-by: Sandeep Sukhani <sandeep.d.sukhani@gmail.com>
Signed-off-by: Sandeep Sukhani <sandeep.d.sukhani@gmail.com>
Signed-off-by: Sandeep Sukhani <sandeep.d.sukhani@gmail.com>
13923b4
to
c4c502e
Compare
What this PR does:
Adds the following 3 new metrics for monitoring the progress of the processing of delete request:
purger_load_pending_requests_attempts_total
: Number of attempts that were made to load pending requests with status.purger_oldest_pending_delete_request_age_seconds
: Age of oldest pending delete request in seconds.purger_pending_delete_requests_count
: Count of requests which are in process or are ready to be processed.This PR also loads new delete requests for processing on startup instead of waiting for the first tick, which is an hour now.