Closed Bug 1947256 Opened 9 months ago Closed 6 months ago

add frontend event telemetry for model management interactions

Categories

(Toolkit :: Add-ons Manager, task, P3)

task
Points:
5

Tracking

()

VERIFIED FIXED
141 Branch
Tracking Status
firefox140 --- verified
firefox141 --- verified

People

(Reporter: Mardak, Assigned: ngrato)

References

(Blocks 1 open bug)

Details

(Whiteboard: [genai])

Attachments

(4 files, 1 obsolete file)

we'll want to understand how users interact with models page bug 1944690 with its custom dropdowns bug 1947204 including per model related interactions bug 1947205 and details page bug 1947198. potentially also download confirmation dialog bug 1947214 depending on how it's implemented (e.g., OMC has default telemetry) but could be separate bug as it's likely outside of add-ons manager

some telemetry might already be handled by add-ons manager pages

See Also: → 1947258

Setting priority as P3 for now, the team working on these changes will bump the priority when they are ready to work on this part.

Severity: -- → N/A
Type: enhancement → task
Priority: -- → P3
Blocks: 1959521

this bug is basically frontend interactions with about:addons model management (vs bug 1947258 backend). there's existing events for various management that sends back addon_id

ml model addon id is currently a hash of name and version but maybe it could have some plaintext to simplify figuring out what model it is instead of tracking a reverse mapping back to model https://searchfox.org/mozilla-central/rev/4c065f1df299065c305fb48b36cdae571a43d97c/toolkit/mozapps/extensions/internal/ModelHubProvider.sys.mjs#137-141

here's an example uninstalling i believe a smart tab model:

    {
      "timestamp": 0,
      "category": "addons_manager",
      "name": "uninstall_other",
      "extra": {
        "value": "b41fad6009295d6508e09b998502aa18ffb6cddd...5f61f0a435f59370@modelhub.mozilla.org",
        "glean_timestamp": "1746466232877",
        "blocklist_state": "undefined"
      }
    },
    {
      "timestamp": 0,
      "category": "addons_manager",
      "name": "manage",
      "extra": {
        "blocklist_state": "undefined",
        "glean_timestamp": "1746466232877",
        "addon_id": "b41fad6009295d6508e09b998502aa18ffb6cddd...5f61f0a435f59370@modelhub.mozilla.org",
        "addon_type": "other",
        "method": "uninstall"
      }
    }

where there's both metrics_legacy for that uninstall_other https://searchfox.org/mozilla-central/rev/4c065f1df299065c305fb48b36cdae571a43d97c/toolkit/mozapps/extensions/metrics_legacy.yaml#1031
and metrics for manage https://searchfox.org/mozilla-central/rev/4c065f1df299065c305fb48b36cdae571a43d97c/toolkit/mozapps/extensions/metrics.yaml#338

when this bug was originally filed, there were other model management UI like dropdown, so whatever is left of what's been prioritized should have events if they don't exist

Summary: add event telemetry for model management interactions → add frontend event telemetry for model management interactions

ngrato, looks like these with model_management event category are desired but still good to see what might be easier and what's actually necessary for 140 https://docs.google.com/spreadsheets/d/11oIvgxbxBptTvIF0X9bZE_T7xBT7_bdtK03CdsM6_JM

Adding glean event handlers

Assignee: nobody → ngrato
Status: NEW → ASSIGNED

Adding glean event handlers

Attachment #9486724 - Attachment is obsolete: true
Attachment #9487825 - Attachment description: mozilla-unified % Bug 1947256 - add frontend event telemetry for model management interactions r=zombie! → Bug 1947256 - add frontend event telemetry for model management interactions r=zombie!
Attachment #9491049 - Flags: approval-mozilla-beta?
Pushed by ngrato@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/fcc903142807 add frontend event telemetry for model management interactions r=zombie,Mardak
Status: ASSIGNED → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → 141 Branch
No longer depends on: 1947204

firefox-beta Uplift Approval Request

  • User impact if declined: will not be able to track telemetry metrics for Local model management
  • Code covered by automated testing: yes
  • Fix verified in Nightly: yes
  • Needs manual QE test: yes
  • Steps to reproduce for manual QE testing: Trigger events outlines in the metrics yaml file and validate they are coming through on the telemetry side.
  • Risk associated with taking this patch: potential UI bugs in local model management page
  • Explanation of risk level: low risk, this patch mostly adds event triggers to Glean
  • String changes made/needed: n/a
  • Is Android affected?: no
Flags: qe-verify+
Attachment #9491049 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Verified as Fixed. Tested on the latest Nightly (141.0a1/20250528211605) under Windows 11 and Ubuntu 24.04 LTS.

Checking the Glean Debug ping Viewer (https://debug-ping-preview.firebaseapp.com/) shows events from the model_management category for:

  • accessing the list view of the “Manage On-Device AI Models” page
  • accessing the details view of a model
  • initiating the removal of a model
  • removing a model
  • clicking the three dot menu on the model card
  • clicking the model card link

See attached screenshots for more details.

I will check Beta 140, as well, once the changes land there (most likely tomorrow).

Status: RESOLVED → VERIFIED
Flags: qe-verify+
Attached image 2025-05-29_14h05_46.png
Attached image 2025-05-29_14h05_58.png
Blocks: 1969308

Verified as Fixed. Tested on the latest Beta (140.0b3/20250528175626 from https://treeherder.mozilla.org/jobs?repo=mozilla-beta&revision=ccf0a22c814523c8b9a9d9212c1fb4ba5aab4977) under Windows 11 and Ubuntu 24.04 LTS.

Checking the Glean Debug ping Viewer (https://debug-ping-preview.firebaseapp.com/) shows events from the model_management category for:

  • accessing the list view of the “Manage On-Device AI Models” page
  • accessing the details view of a model
  • initiating the removal of a model
  • removing a model
  • clicking the three dot menu on the model card
  • clicking the model card link
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: