Closed Bug 1913218 Opened 6 months ago Closed 5 months ago

Enable new Glean library `suggest`

Categories

(Data Platform and Tools :: Glean Platform, task)

task

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: bdk, Unassigned)

References

Details

To be filled by the requester

Library Canonical Name: Suggest
Description: Application-services cross-platform suggest library.
Data-review response link: https://bugzilla.mozilla.org/show_bug.cgi?id=1911664
Repository URL: https://github.com/mozilla/application-services/
Locations of metrics.yaml files (can be many):

  • components/suggest/metrics.yaml

Locations of pings.yaml files (can be many):

  • None in app-services. These live in the consumer applications.

Data owners:

Dependency of:

  • Fenix
  • Firefox-ios
  • Firefox Desktop

Notes

This is for the cross-platform suggest component. The plan is to start collecting these metrics on Firefox desktop, then in the future we can also collect them for iOS and Android. I'm hoping a single bug works for this. I can file multiple if needed.

I've never added new app-services metrics for Firefox Desktop, is there any extra steps to make them available to the JS code?

Blocks: 1911639

Any updates on this one? Our team is hoping to start using these metrics soon.

(In reply to Ben Dean-Kawamura [:bdk] from comment #2)

Any updates on this one? Our team is hoping to start using these metrics soon.

Sorry, PTO, reorg, layoffs got us a bit distracted :'( Let me flag this.

How and where will the data be generated? There's currently no recording code for that in a-s (and it can't just use glean-rs unfortunately).

Usually we would expect recording to be in the same repo where the definition files are.
I guess a-s is vendored into m-c, so we could add them to the index there and have the corresponding code be generated there.

Flags: needinfo?(bdeankawamura)

I'm hoping to record it in moz-central. There's currently code in the Rust component to return the metrics, I'm hoping to wire up the JS to record them to Glean somehow.

I'm happy to put this directly in moz-central if that's better for you, I was following the pattern we have for mobile where we define the metrics in app-services then record them in the Firefox application.

Flags: needinfo?(bdeankawamura)

For which other library do we do this already?

In the meantime I'll prepare today how we can get that working.

Flags: needinfo?(bdeankawamura)

(In reply to Jan-Erik Rediger [:janerik] from comment #6)

For which other library do we do this already?

In the meantime I'll prepare today how we can get that working.

Sorry, I was confused about this. For other components, we record the metrics the Kotlin/Swift wrappers that live in the app-services repository.

If it makes more sense, I can move the Suggest metrics.yaml into moz-central. That's where we're going to record these initially. We may want to record Android/iOS metrics eventually though, so I'm not sure.

Flags: needinfo?(bdeankawamura)

Yeah, I'm somewhat disliking having the metrics.yaml in one spot and the recording in another plus these additional methods to expose the data, but that's due to other restrictions right now.

So it would work to add third_party/rust/suggest/metrics.yaml to toolkit/components/glean/metrics_index.py and that gets you these metrics generated in m-c and usable there (from Rust, C++ and JavaScript).
It would be the first time referencing third_party though and the recording code would be in another component still.
Then again having the metrics defined next to where there's additional methods exposing the data to be recorded makes sense.

In any case, we wouldn't define this as its own library, it just becomes part of Gecko.
Let me quickly talk with chutten to see what we like more.

Talked with chutten.
For now the best way forward would be to put the metrics.yaml to where the recording happens, so into mozilla-central.
It should then go into the firefox_desktop_metrics section of toolkit/components/glean/metrics_index.py. If we eventually also put those into Fenix it won't clash.

Sounds good. I think these will end up in browser/components/urlbar/metrics.yaml, so there's no need to modifymetrics_index.py` (https://phabricator.services.mozilla.com/D222506). Closing this one since it seems like no action is needed.

Status: NEW → RESOLVED
Closed: 5 months ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.