missing prometheus metrics for failed (stripe) transactions
in !48 (merged), we figure out that:
Something else to consider for this sort of alert generation: Failed one-time transactions which pass form validation but are rejected by the payment processor. We are currently not generating metrics from these events, but we are generating logs which say:
A one-time Stripe payment was attempted but failed, with ID: 1234567890ABCDEF
It's not clear to me whether Stripe will always prevent suspected-to-be-stolen card numbers from making a purchase at point of sale, or whether they will allow the transaction to occur but refuse to process the transaction, and pass that refusal along via webhook. If it's the latter, then:
- The above error message should be able to be found in logs, and
- If they are found in bulk, it might be germane to have alert-generating metrics in these cases
TL;DR: we're not logging transactions that pass form validation, but are rejected by the payment processor.
We must have metrics for those, as this is something we want to alert on and track in our dashbaords.
We should, in particular, have metrics for situations and exceptions like https://gitlab.torproject.org/tpo/web/civicrm/-/issues/145, but more importantly card testing scenarios.