6.6 KiB
Executable File
title, date, tags
| title | date | tags | |||
|---|---|---|---|---|---|
| CPM PR0 — complete telemetry change | 2026-10-16 |
|
CPM PR0: one terminal report per failure episode
Proposed change:
Replace separate init_failed, stuck, recovery[with/without reload] and CPM post-reload-failure events with web_extension_cpm_episode. Each report contains the initial failure and its observed outcome, so diagnosis no longer requires joining separate failure, stuck and recovery events.
When it fires:
The first 4s timeout opens an episode and captures one diagnostic snapshot.
Later failures and reloads update local state. A qualifying dashboard response or a five-minute deadline closes the episode and emits one logical report. The deadline works without further navigations. Existing stuck detection and automatic reload behavior are preserved.
A response does not prove initResp delivery or recovery of every failing tab. Deadline expiry does not prove permanent failure; unfinished episodes can be lost if the monitor or process is destroyed.
Reporting frequency:
Both platforms use daily+count (.dailyAndCount). The first completed episode each day sends _daily and _count with the same summary; every later completed episode sends _count only. Daily deduplication is by event name, across all outcomes. _daily estimates affected installations per day; _count counts completed episodes.
Attribution:
Five added summary parameters:
-
reason: the first timeout's context —session_restoration,tab_crash,extension_reloadorother. Previously encoded in failure pixel names. -
was_stuck: whether a later eligible non-restoration navigation, begun after the first failure, also timed out. -
outcome:failed_measurement_responsefor the measurement that timed out;failed_tab_responsefor a later measurement on a failing tab;other_tab_responsefor another tab;unattributed_responsefor an ambiguous current-document match; orno_response_before_deadline. -
reload_state:none(no reload observed),pending(replacement started),failed(replacement failed),loaded(replacement loaded), orresponse_timed_out(its first eligible messaging measurement timed out). Loaded alone does not prove messaging recovery. -
response_after: elapsed time since the first failure, bucketed asunder_30s,30s_to_1mor1m_to_deadline. Omitted for the no-response outcome.
Parameters to add (not implemented yet):
Port and adapt four fields from alex/cpm-messaging-readiness-telemetry:
-
bg_ready_after— whether background loading is pending, failed or complete. Values:none(no background view),pending,failed, or completion-time bucketsunder_1s,1s_to_4s,4s_to_10s,10s_to_30s,over_30s. Separates a background still starting from one already ready. -
bg_view_age— age of the current background view:under_4s,4s_to_8s,8s_to_30s,30s_to_2m,over_2m. Distinguishes a fresh wake from a failure long after view creation; omitted when no current view exists. -
bg_load_error_after— time from the affected view's creation to WebKit error 6:under_5s,5s_to_25s,25s_to_35s,over_35s. Tests whether the failure coincides with the 30-second background-load timer. -
bg_load_error_app_state— app state when that error occurred:active,inactiveorbackground(macOS: active/inactive). Helps distinguish foreground failures from background suspension conditions.
Capture these values in the first-failure snapshot and send them in the same terminal episode report, retaining daily+count. Omit unavailable values. Send the two error fields only for error 6 attributed to the corresponding background-load attempt, rather than any historical error in the context. Check the added fields' combined distinguishability with the retained bg_events.
app_state and open_tabs remain deferred to targeted startup/no-view diagnostics; loading_tabs is not planned for this change. These additions do not change the four-second detector or add page-side initResp acknowledgement.
Eight existing diagnostic booleans from ✓ TD: CPM failure pixels attribution: all are captured at the first failure; unavailable facts are omitted.
-
context_loaded— extension context loaded;bg_view_alive— current background view exists. -
bg_process_alive— its process is alive;bg_process_responsive— WebKit considers it responsive. -
tab_in_context— failing tab registered in WebKit;handler_registered— autoconsent native handler registered. -
tab_controller_match— tab and context controllers match;tab_has_ext_scripts— extension scripts remain registered.
bg_events is kept included, using the existing encoder: the latest 12 events at the first failure, oldest first, as sanitized token@age entries. Ages use 30s, 1m, 2m, 5m, 15m and over_15 buckets; older entries are dropped to keep the value within 255 characters. The timeline can contain error descriptors. Later failures and recovery do not replace or append to this snapshot.
Standard metadata remains: appVersion on both platforms, plus pixelSource and channel on macOS.
Remove retired pixels from ✓ TD: CPM failure pixels attribution:
-
debug_web_extension_cpm_initialization_failed_after_session_restoration -
debug_web_extension_cpm_initialization_failed_after_other -
debug_web_extension_cpm_initialization_failed_after_tab_crash -
debug_web_extension_cpm_initialization_failed_after_extension_reload -
debug_web_extension_cpm_messaging_stuck_session_restoration -
debug_web_extension_cpm_messaging_stuck_tab_crash -
debug_web_extension_cpm_messaging_stuck_extension_reload -
debug_web_extension_cpm_messaging_stuck_other -
debug_web_extension_cpm_messaging_recovered_without_extension_reload -
debug_web_extension_cpm_messaging_recovered_after_extension_reload -
debug_web_extension_cpm_messaging_extension_reload_failed
Parameters removed from transmission:
context_errors, network_restarted, critical_memory_age, bg_view_creations, bg_view_leaked_count, app_version_change, app_launch_age, background_graveyard_enabled and recovery_from. Episode state and response attribution replace recovery_from. Graveyard attribution is also removed from the diagnostic model and monitor.