✨ [PANA-3969] Try to collect some initial view metrics even when the page unloads early #3808
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.
Motivation
After looking at the initial view metrics telemetry we've collected so far, I'm a bit concerned that the numbers may be distorted by not including any data about situations where a navigation occurs before the load event has fired. I'd like to try to get at least some data about what's happening in these situations.
Changes
This PR adds a second variant to the initial view metrics telemetry. Now, if
PAGE_MAY_EXIT
fires with reasonUNLOADING
before we've send the telemetry, we'll try to send a minimal telemetry message that includes:Test instructions
Probably easiest to test this on staging; I'll push it there.
Checklist