-
Notifications
You must be signed in to change notification settings - Fork 81
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
aws-janitor: add job duration metric #78
aws-janitor: add job duration metric #78
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 for this PR! just a few minor suggestions, otherwise this largely LGTM
@@ -143,3 +183,24 @@ func markAndSweep(opts resources.Options, region string) error { | |||
|
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.
no action required in this change, but in the future it might be worth reporting how many resources were deleted, too (see line directly above this one, I just can't comment on it directly)
(there's probably a similar count obtainable from CleanAll()
)
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 for your review and feedback Jeff
Added a metric to report the sweep, the CleanAll()
function does not return how many resources were deleted, but i think we can add that, i can do that if you think that will be good
ptal
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.
yeah, we'd need to pass that information back from CleanAll()
, but that can happen separately.
@@ -143,3 +183,24 @@ func markAndSweep(opts resources.Options, region string) error { | |||
|
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.
yeah, we'd need to pass that information back from CleanAll()
, but that can happen separately.
433f40d
to
7553aa1
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cpanato, ixdy The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
...to collect the response time when running this job
this is a short live job, and then we cannot guarantee that we will have someone to scrape the data at the correct time, to avoid that, we need to use the Prometheus PushGateway to store the metrics and then have Prometheus scrape the PushGateway, however, the problem continues, we need to make sure the metrics are pushed to the PushGateway in time.
So for that, we need to push ourselves, then the approach in this PR is to push when exiting the job
this is part of #13
opening this PR for feedback and see if sounds good
a screenshot for the metric pushed to PushGateway
/assign @ixdy