98 lines
4.9 KiB
Markdown
Executable File
98 lines
4.9 KiB
Markdown
Executable File
---
|
|
title: CPM PR0 — complete telemetry change
|
|
date: '2026-10-16'
|
|
tags:
|
|
- work
|
|
- cpm
|
|
- telemetry
|
|
---
|
|
# 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_reload` or `other`. [Previously](https://app.asana.com/1/137249556945/project/481882893211075/task/1218619301158188?focus=true) 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_response` for the measurement that timed out; `failed_tab_response` for a later measurement on a failing tab; `other_tab_response` for another tab; `unattributed_response` for an ambiguous current-document match; or `no_response_before_deadline`.
|
|
|
|
- `reload_state`: `none` (no reload observed), `pending` (replacement started), `failed` (replacement failed), `loaded` (replacement loaded), or `response_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 as `under_30s`, `30s_to_1m` or `1m_to_deadline`. Omitted for the no-response outcome.
|
|
|
|
|
|
**Eight existing diagnostic booleans** from [✓ TD: CPM failure pixels attribution](https://app.asana.com/1/137249556945/project/481882893211075/task/1218619301158188?focus=true): 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](https://app.asana.com/1/137249556945/task/1218619301158188)**:**
|
|
|
|
- `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.
|
|
|