Live demo — this is what BlameTrail looks like on the Pro plan.
Get Started FreePayment processing failures — 500 error spike
Deploy Suspected (#1)
at startv2.14.0 · a1b2c3d · by alex.chen
Incident Opened
+12mcritical availability incident detected
AI Summary Requested
+13mSentry Issue Linked
+13mpayment-api · PROJ-4821
Incident Acknowledged
+14mAI Summary Generated
+14mRoot cause analysis completed
Jira Ticket Linked
+17mPAY-1247 — Payment processing failures — 500 error spike
Observability Summary
+19mMetrics and logs analysis completed
Incident Resolved
+39mAI Summary
Updated with details from the most likely recent deploy, including recent code changes when available.
The Payment API began returning HTTP 500 errors on POST /v1/payments/charge at 08:17 PM. The error rate jumped from a baseline of ~0.5% to 42% within 2 minutes. **Root cause:** Deploy v2.14.0 (commit a1b2c3d) introduced a null-reference bug in `src/services/payment/validator.ts`. The new Stripe metadata validation accesses `metadata.customer_tier` without a null check. Roughly 40% of payment requests lack this field, causing `TypeError: Cannot read properties of null (reading 'customer_tier')`. **Impact:** ~1,240 failed payment attempts over 27 minutes. No duplicate charges detected — failures occurred before the charge was submitted to Stripe. **Resolution:** Rollback deploy v2.14.1 (commit f4e5d6a) added an optional-chaining guard. Error rate returned to baseline within 3 minutes of deployment.
Why This Deploy Is Suspected
Structured evidence behind the current top suspect deploy.
a1b2c3dv2.14.0feature/tiered-pricingSuspicion Signal
Deployed 12 minutes before incident. Changed payment validation logic in the exact endpoint that started failing.
Commit
feat: validate Stripe metadata.customer_tier for tiered pricing
Pull Request
Add tiered pricing validation to payment flow
Most Relevant Changed Files
src/services/payment/validator.tsDirectly modifies payment validation logic — the exact code path producing 500 errors.
src/services/payment/types.tsAdds CustomerTier type definition used by the new validation.
src/services/payment/__tests__/validator.test.tsTest file — tests pass but don't cover the null metadata case.
Generate a revert or AI-powered fix and open a pull request.
24 traces queried · 5 with errors
| Score | Service | Operation | Duration | Spans | Errors |
|---|---|---|---|---|---|
78 | payment-api | POST /v1/payments/charge | 1240ms | 8 | 2 |
62 | payment-api | POST /v1/payments/charge | 890ms | 6 | 1 |
35 | payment-api | GET /v1/payments/history | 320ms | 4 | 0 |
Latency Regressions
AI Observability Summary
AI-generated analysis of metrics, logs, and deploy context for this incident.
Correlated a sharp error rate spike (0.5% → 42%) with deploy v2.14.0, which landed 12 minutes before incident onset. Logs confirm TypeError in payment/validator.ts when metadata.customer_tier is null. The spike resolves after rollback deploy v2.14.1.
Likely Causes
Null-reference in Stripe metadata validation (validator.ts:47)
highLogs show TypeError: Cannot read properties of null (reading 'customer_tier') on 40% of requests. Introduced in commit a1b2c3d.
Missing null-check for optional Stripe metadata field
highmetadata.customer_tier is only present on enterprise accounts (~60% of traffic). The new code assumes it always exists.
Suspicious Commits
a1b2c3dAI Flaggedfeat: validate Stripe metadata.customer_tier for tiered pricing
Introduced metadata.customer_tier access without null guard in payment validation hot path.
Observed Anomalies
- Error rate jumped from 0.5% to 42% within 2 minutes of deploy v2.14.0
- p99 latency dropped from 340ms to 12ms (fast failures — requests error before reaching Stripe)
- No corresponding increase in Stripe API errors — failures occur pre-charge
Recommended Actions
- Add optional chaining: metadata?.customer_tier
- Add null-metadata test case to validator.test.ts
- Consider adding a pre-deploy canary that replays recent production payloads
a1b2c3dfeat: validate Stripe metadata.customer_tier for tiered pricing
Max
42.3%
Avg
14.7%
Min
0.2%
Current
0.4%
| Timestamp | Severity | Message |
|---|---|---|
| May 4, 08:18:19 PM | error | TypeError: Cannot read properties of null (reading 'customer_tier') at validatePayment (validator.ts:47) |
| May 4, 08:19:19 PM | error | Payment charge failed: internal validation error for customer cus_9Qx4mR1kLp — request aborted before Stripe call |
| May 4, 08:20:19 PM | warning | Error rate threshold exceeded: 15.2% (threshold: 5%) on POST /v1/payments/charge |
| May 4, 08:21:19 PM | error | TypeError: Cannot read properties of null (reading 'customer_tier') at validatePayment (validator.ts:47) |
| May 4, 08:24:19 PM | error | Batch failure: 47/120 payment requests returned HTTP 500 in the last 60 seconds |
| May 4, 08:28:19 PM | error | TypeError: Cannot read properties of null (reading 'customer_tier') at validatePayment (validator.ts:47) |
| May 4, 08:34:19 PM | info | Deploy v2.14.1 initiated by ops-bot — rollback of v2.14.0 (commit f4e5d6a) |
| May 4, 08:40:19 PM | info | Error rate recovering: 2.1% on POST /v1/payments/charge (was 42%) |
| May 4, 08:43:19 PM | info | Error rate returned to baseline: 0.4% on POST /v1/payments/charge — incident auto-resolved |