Add telemetry for the weekly privacy report notification worker
Categories
(Firefox for Android :: Experimentation and Telemetry, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox159 | --- | fixed |
People
(Reporter: towhite, Assigned: Gela)
References
(Blocks 1 open bug)
Details
(Whiteboard: [android-activation-trust] [fxdroid])
Attachments
(3 external files, 2 obsolete files)
Summary
Add telemetry for the weekly privacy report notification to understand the full lifecycle of the feature, including:
- whether the background worker runs as expected,
- whether a notification is shown, clicked, or dismissed,
- whether the notification channel or app-level notifications have been disabled,
The telemetry should provide enough information to distinguish between a notification that was never attempted, one that was blocked by notification settings, and one that was successfully delivered but not interacted with.
Background
PrivacyReportNotificationWorker currently has no telemetry.
Recording only shown, clicked, and dismissed events would leave important gaps in understanding the feature's behaviour in the wild. In particular, states that prevent a notification from being shown would otherwise be invisible. For example:
- the worker was not scheduled,
- the worker was scheduled but did not run,
- the worker ran but did not show a notification,
- the notification channel was disabled,
- app-level notifications were disabled, or
- the worker ran outside the expected weekly cadence.
The goal is therefore to instrument the full lifecycle of the feature rather than only notification interactions. Analysis should be able to determine whether the worker is operating as expected and, when a notification is not delivered, identify where in the lifecycle it stopped.
Because this functionality runs in the background, telemetry should not rely solely on the standard events ping eventually being flushed. We should also have a durable mechanism for reporting the worker's state.
Possible tasks
-
[ ] Worker execution
- Record an event whenever
PrivacyReportNotificationWorkerruns, regardless of whether a notification is ultimately shown.
- Record an event whenever
-
[ ] Notification interaction
- Record
shown,clicked, anddismissedtelemetry for the notification.
- Record
-
[ ] Notification availability
- Capture when the feature's notification channel is disabled.
- Capture when app-level notifications are disabled.
- Distinguish between channel-level and app-level notification opt-out.
-
[ ] Worker state
- Record whether the worker is currently scheduled.
- Maintain a counter for the number of times the worker has run.
-
[ ] Delivery cadence
- Record the timestamp at which the notification schedule was first established.
- Associate worker executions/notifications with a weekly sequence number. (A nice to have)
- Provide enough information to determine whether expected weekly executions occurred and identify missed or delayed runs.
-
[ ] Durable reporting
- Add a custom Glean ping for the privacy report notification worker, following the existing
pings.yamlpattern. - Include the relevant events and roll-up/state metrics in the ping.
- Submit the ping explicitly at appropriate points where we control scheduling/state changes, rather than relying solely on the standard events ping being flushed.
- Add a custom Glean ping for the privacy report notification worker, following the existing
Analysis requirements
The resulting telemetry should allow us to reconstruct, as far as possible, the lifecycle for a given installation:
scheduled → worker ran → notification shown → clicked/dismissed
It should also allow us to identify where that lifecycle stopped, including cases where the worker was unscheduled or notifications were disabled.
This should make it possible to answer questions such as:
- Was the worker scheduled?
- Did it run when expected?
- How many times has it run?
- Was a notification shown for a given run?
- Was the notification clicked or dismissed?
- Were notifications unavailable because the channel was disabled?
- Were notifications unavailable because app-level notifications were disabled?
- Are notifications being delivered at approximately the intended weekly cadence?
Previous work
An earlier version of the shown / clicked / dismissed telemetry, using a BroadcastReceiver, was drafted as part of bug 2060524 before being removed from the stack.
See:
Updated•3 months ago
|
Updated•3 months ago
|
Updated•3 months ago
|
Updated•3 months ago
|
Updated•2 months ago
|
Updated•2 months ago
|
Updated•2 months ago
|
Updated•2 months ago
|
Updated•2 months ago
|
Comment 7•2 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/fa7d7058a5fd
https://hg.mozilla.org/mozilla-central/rev/fc3943688575
Updated•2 months ago
|
Updated•2 months ago
|
Comment 9•1 month ago
|
||
| bugherder | ||
Updated•1 month ago
|
Updated•1 month ago
|
Description
•