Skip to content

Commit

Permalink
[usage] Alert on stripe webhooks and invoice finalize
Browse files Browse the repository at this point in the history
  • Loading branch information
easyCZ committed Sep 20, 2022
1 parent 0fb5171 commit 02f98fe
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions operations/observability/mixins/meta/rules/usage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,17 @@ spec:
summary: There are failed Stripe invoice reconciliations.
description: We have accumulated {{ printf "%.2f" $value }} failures. This affects how much customers will be billed.

- alert: GitpodUsageBillingServiceFinalizeInvoicesFailures
expr: sum(increase(grpc_server_handled_total{grpc_service="usage.v1.BillingService", grpc_method="FinalizeInvoice", grpc_code!="OK"})) > 1
for: 30m
labels:
severity: warning
team: webapp
annotations:
runbook_url: https://github.com/gitpod-io/runbooks/blob/main/runbooks/GitpodUsageBillingServiceFinalizeInvoicesFailures.md
summary: Invoice finalization is failing. We are not balancing out user/team usage.
description: We have accumulated {{ printf "%.2f" $value }} failures. This affects if customers have their balance reset and can therefore start new workspaces.

- alert: GitpodUsageTooLongSinceLastSuccessfulLedgerReconciliation
expr: (time() - gitpod_usage_ledger_last_completed_time{outcome!="success"}) > 60 * 60
for: 30m
Expand Down

0 comments on commit 02f98fe

Please sign in to comment.