Add analytics for payments cancelled due to polling timeout#13183
Add analytics for payments cancelled due to polling timeout#13183cttsai-stripe wants to merge 6 commits into
Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Committed-By-Agent: claude
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Committed-By-Agent: claude
Replaces time_limit_seconds with payment_method_type for easier slicing in incident investigation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Committed-By-Agent: claude
Follows the documented component.flow.error pattern from the Error Analytics Trailhead doc. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Committed-By-Agent: claude
|
Diffuse output: APKDEX |
|
Most of the PMs poll here so we need to fire this event here as well |
| ctaText = R.string.stripe_blik_confirm_payment, | ||
| stripeAccountId = requestOptions.stripeAccount, | ||
| qrCodeUrl = null, | ||
| paymentMethodType = PaymentMethod.Type.Blik.code, |
There was a problem hiding this comment.
should we use actionable.paymentMethod?.type here (and below) instead of hardcoding this. If we added a new PM that also used this branch, then this would become incorrect
| performOneOffPoll() | ||
| } | ||
|
|
||
| private suspend fun performOneOffPoll() { |
There was a problem hiding this comment.
why did the performOneOffPoll function get removed here?
If we need to send this event from multiple places, we may not want to use errorReporter. Using an event reporter can enforce that we send the same params for an analytic event no matter where we trigger it from, vs. errorReporter we'd probably end up duplicating our params logic in two places |
Addresses review feedback: use a typed event reporter interface instead of ErrorReporter to enforce consistent params across both polling sites (PollingViewModel and PaymentFlowResultProcessor). Also uses dynamic paymentMethod type instead of hardcoding in PollingNextActionHandler. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Committed-By-Agent: claude
Summary
POLLING_TIMEOUT_CANCELLATIONanalytics event that fires when the SDK cancels a payment because the polling budget was exceededtime_limit_secondsandlast_known_statusas additional params for investigationErrorReporterin the polling DI graphMotivation
RUN_MOBILESDK-5413 — incident remediation to improve detection of payments cancelled due to polling timeout.
Test plan
🤖 Generated with Claude Code