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

[usage] Track last compelted ledger job time #12961

Merged
merged 1 commit into from
Sep 15, 2022

Conversation

easyCZ
Copy link
Member

@easyCZ easyCZ commented Sep 14, 2022

Description

Adds a Gauge metric which tracks the last time we completed a scheduled ledger reconciliation. We'll use this metric to setup an alert for when we haven't completed a run succesfully for more than 1h (which could cause us to have gaps in the data).

This metric is setup the same way as other standard kube metrics- see example

Related Issue(s)

Fixes #

How to test

Release Notes

NONE

Documentation

Werft options:

  • /werft with-preview

@easyCZ easyCZ requested a review from a team September 14, 2022 12:58
@github-actions github-actions bot added the team: webapp Issue belongs to the WebApp team label Sep 14, 2022
@@ -37,51 +34,6 @@ func NewPeriodicJobSpec(period time.Duration, id string, job Job) (JobSpec, erro
}, nil
}

func NewLedgerTriggerJobSpec(schedule time.Duration, job Job) (JobSpec, error) {
Copy link
Member Author

Choose a reason for hiding this comment

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

This is moved into separate file to make navigation a bit easier.

Comment on lines +33 to +35
defer func() {
reportLedgerCompleted(err)
}()
Copy link
Member Author

Choose a reason for hiding this comment

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

This is the only change in logic - reporting the metric

@roboquat roboquat merged commit 075d856 into main Sep 15, 2022
@roboquat roboquat deleted the mp/usage-track-last-completed-time branch September 15, 2022 06:23
@roboquat roboquat added deployed: webapp Meta team change is running in production deployed Change is completely running in production labels Sep 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: webapp Meta team change is running in production deployed Change is completely running in production release-note-none size/L team: webapp Issue belongs to the WebApp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants