Add load_timings to PaymentSheet load analytics via DurationProvider#13195
Draft
amk-stripe wants to merge 1 commit into
Draft
Add load_timings to PaymentSheet load analytics via DurationProvider#13195amk-stripe wants to merge 1 commit into
amk-stripe wants to merge 1 commit into
Conversation
- Add completedDuration(key) API to DurationProvider interface - Update DefaultDurationProvider to store completed durations in a second map; start(reset=true) clears any previous completed value, end() stores the duration, and measureDuration always resets before measuring - Add two new DurationProvider.Key values: PaymentSheetLoadLogLoadStarted and PaymentSheetLoadComputePaymentMethodTypes - In DefaultPaymentElementLoader, wrap eventReporter.onLoadStarted with PaymentSheetLoadLogLoadStarted and createPaymentMethodMetadata + supportsIntent check with PaymentSheetLoadComputePaymentMethodTypes - In DefaultEventReporter, add buildLoadTimings() helper that reads completed durations for the six PaymentSheet load keys and maps them to analytics field names as integer milliseconds - Add load_timings to PaymentSheetEvent.LoadSucceeded and LoadFailed params when any timings are present - Update all FakeDurationProvider implementations to implement the new completedDuration method - Add DefaultDurationProviderTest covering the completed duration behavior - Extend DefaultEventReporterTest to verify load_timings appear in both mc_load_succeeded and mc_load_failed with correct mapped keys and ms values - Extend DefaultPaymentElementLoaderTest to verify timing keys after successful load, failed load, and path-specific cases Committed-By-Agent: goose
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Committed-By-Agent: goose
Summary
Motivation
Testing
Screenshots
Changelog