@@ -14,24 +14,24 @@ spec:
14
14
groups :
15
15
- name : usage
16
16
rules :
17
- - alert : GitpodUsageReconcileUsageFailures '
18
- expr : sum(increase(grpc_server_handled_total{grpc_service="usage.v1.UsageService ", grpc_method="ReconcileUsage ", grpc_code!="OK"})) > 1
17
+ - alert : GitpodUsageReconcileInvoicesFailures '
18
+ expr : sum(increase(grpc_server_handled_total{grpc_service="usage.v1.BillingService ", grpc_method="ReconcileInvoices ", grpc_code!="OK"})) > 1
19
19
for : 30m
20
20
labels :
21
21
severity : warning
22
22
team : webapp
23
23
annotations :
24
- runbook_url : https://github.com/gitpod-io/runbooks/blob/main/runbooks/GitpodUsageReconcileUsageFailures .md
25
- summary : There are failed usage reconciliations.
26
- description : We have accumulated {{ printf "%.2f" $value }} failures. This affects how up-to-date usage data is .
24
+ runbook_url : https://github.com/gitpod-io/runbooks/blob/main/runbooks/GitpodUsageReconcileInvoicesFailures .md
25
+ summary : There are failed Stripe invoice reconciliations.
26
+ description : We have accumulated {{ printf "%.2f" $value }} failures. This affects how much customers will be billed .
27
27
28
- - alert : GitpodUsageReconcileInvoicesFailures'
29
- expr : sum(increase(grpc_server_handled_total{grpc_service="usage.v1.BillingService", grpc_method="ReconcileInvoices", grpc_code !="OK "})) > 1
28
+ - alert : GitpodUsageTooLongSinceLastSuccessfulLedgerReconciliation
29
+ expr : (time() - gitpod_usage_ledger_last_completed_time{outcome !="success "}) > 60 * 60
30
30
for : 30m
31
31
labels :
32
32
severity : warning
33
33
team : webapp
34
34
annotations :
35
- runbook_url : https://github.com/gitpod-io/runbooks/blob/main/runbooks/GitpodUsageReconcileInvoicesFailures .md
36
- summary : There are failed Stripe invoice reconciliations .
37
- description : We have accumulated {{ printf "%.2f" $value }} failures. This affects how much customers will be billed .
35
+ runbook_url : https://github.com/gitpod-io/runbooks/blob/main/runbooks/GitpodUsageTooLongSinceLastSuccessfulLedgerReconciliation .md
36
+ summary : Usage reconciliation has not run successfully for {{ printf "%.2f" $value }} seconds. Usage data is stale .
37
+ description : We have not executed scheduled usage reconciliation for {{ printf "%.2f" $value }} seconds. We expect the data to update every 15 minutes to avoid stale usage records and stale invoices .
0 commit comments