Skip to content

Bug 2034534 - Use glean-sym to record a metric from places Rust implementation#7336

Draft
badboy wants to merge 1 commit into
mozilla:mainfrom
badboy:glean-dylib
Draft

Bug 2034534 - Use glean-sym to record a metric from places Rust implementation#7336
badboy wants to merge 1 commit into
mozilla:mainfrom
badboy:glean-dylib

Conversation

@badboy
Copy link
Copy Markdown
Member

@badboy badboy commented Apr 23, 2026

This is not yet ready (I need to actually properly test it and also decide if those are the right metrics), but this is how I expect it to look.
Currently building against mozilla/glean#3426
The plan is to land that and a-s can depend on the git version (what is on main) by then.

Copy link
Copy Markdown
Contributor

@bendk bendk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great to me and the plan of using Glean main for a bit is totally fine with me. The Rust changes look great, I'm excited to start using code like that myself.

Comment thread components/places/metrics.yaml
@badboy
Copy link
Copy Markdown
Member Author

badboy commented May 13, 2026

DATA REVIEW REQUEST

  1. What questions will you answer with this data?
  • Is glean-sym working when called from appservices
  • Are the values comparable to the original metrics?
  1. Why does Mozilla need to answer these questions? Are there benefits for users?
    Do we need this information to address product or business requirements?

We're introducing a new Rust API to be used across libraries and we need to ensure it works as expected.

  1. What alternative methods did you consider to answer these questions?
    Why were they not sufficient?

This is using a new API and the metrics are used for validation.

  1. Can current instrumentation answer these questions?

TODO: Fill this in.

  1. List all proposed measurements and indicate the category of data collection for each
    measurement, using the Firefox data collection categories found on the Mozilla wiki.
Measurement Name Measurement Description Data Collection Category Tracking Bug
places_manager.connection_initialized Number of times a PlacesConnection was initialized. technical https://bugzilla.mozilla.org/show_bug.cgi?id=2034534
places_manager.run_maintenance_chk_pnt_time_temp Time taken to execute PRAGMA_CHECKPOINT inside run_maintenance() Duplication of run_maintenance_chk_pnt_time_temp for glean-sym testing. technical https://bugzilla.mozilla.org/show_bug.cgi?id=2034534
places_manager.run_maintenance_optimize_time_temp Time taken to execute PRAGMA optimize inside run_maintenance() Duplication of run_maintenance_optimize_time for glean-sym testing. technical https://bugzilla.mozilla.org/show_bug.cgi?id=2034534
places_manager.run_maintenance_prune_time_temp Time taken to execute prune_older_visits() inside run_maintenance() Duplication of run_maintenance_prune_time for glean-sym testing. technical https://bugzilla.mozilla.org/show_bug.cgi?id=2034534
places_manager.run_maintenance_vacuum_time_temp Time taken to execute VACUUM inside run_maintenance() Duplication of run_maintenance_vacuum_time for glean-sym testing. technical https://bugzilla.mozilla.org/show_bug.cgi?id=2034534
  1. Please provide a link to the documentation for this data collection which
    describes the ultimate data set in a public, complete, and accurate way.

This collection is Glean so is documented in the Glean Dictionary.

  1. How long will this data be collected?

This collection has expiry '2026-11-13', 6 months after the metrics are added.

  1. What populations will you measure?

All channels, countries, and locales. No filters.

  1. If this data collection is default on, what is the opt-out mechanism for users?

These collections are Glean. The opt-out can be found in the product's preferences.

  1. Please provide a general description of how you will analyze this data.

We use these metrics to validate that glean-sym works as expected and compare their values against the original metrics.
Analysis will be done in sql.telemetry.mozilla.org

  1. Where do you intend to share the results of your analysis?

The analysis will be shared in a public bugzilla bug, and the analysis queries will be linked.

  1. Is there a third-party tool (i.e. not Glean or Telemetry) that you
    are proposing to use for this data collection?

No.


data-review? @travis79

Copy link
Copy Markdown
Member

@travis79 travis79 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Data review only:

DATA REVIEW REQUEST

1. What questions will you answer with this data?


* Is `glean-sym` working when called from appservices

* Are the values comparable to the original metrics?


2. Why does Mozilla need to answer these questions? Are there benefits for users?
   Do we need this information to address product or business requirements?

We're introducing a new Rust API to be used across libraries and we need to ensure it works as expected.

3. What alternative methods did you consider to answer these questions?
   Why were they not sufficient?

This is using a new API and the metrics are used for validation.

4. Can current instrumentation answer these questions?

TODO: Fill this in.

5. List all proposed measurements and indicate the category of data collection for each
   measurement, using the Firefox data collection categories found on the Mozilla wiki.

Measurement Name Measurement Description Data Collection Category Tracking Bug
places_manager.connection_initialized Number of times a PlacesConnection was initialized. technical https://bugzilla.mozilla.org/show_bug.cgi?id=2034534
places_manager.run_maintenance_chk_pnt_time_temp Time taken to execute PRAGMA_CHECKPOINT inside run_maintenance() Duplication of run_maintenance_chk_pnt_time_temp for glean-sym testing. technical https://bugzilla.mozilla.org/show_bug.cgi?id=2034534
places_manager.run_maintenance_optimize_time_temp Time taken to execute PRAGMA optimize inside run_maintenance() Duplication of run_maintenance_optimize_time for glean-sym testing. technical https://bugzilla.mozilla.org/show_bug.cgi?id=2034534
places_manager.run_maintenance_prune_time_temp Time taken to execute prune_older_visits() inside run_maintenance() Duplication of run_maintenance_prune_time for glean-sym testing. technical https://bugzilla.mozilla.org/show_bug.cgi?id=2034534
places_manager.run_maintenance_vacuum_time_temp Time taken to execute VACUUM inside run_maintenance() Duplication of run_maintenance_vacuum_time for glean-sym testing. technical https://bugzilla.mozilla.org/show_bug.cgi?id=2034534

6. Please provide a link to the documentation for this data collection which
   describes the ultimate data set in a public, complete, and accurate way.

This collection is Glean so is documented in the Glean Dictionary.

7. How long will this data be collected?

This collection has expiry '2026-11-13', 6 months after the metrics are added.

8. What populations will you measure?

All channels, countries, and locales. No filters.

9. If this data collection is default on, what is the opt-out mechanism for users?

These collections are Glean. The opt-out can be found in the product's preferences.

10. Please provide a general description of how you will analyze this data.

We use these metrics to validate that glean-sym works as expected and compare their values against the original metrics. Analysis will be done in sql.telemetry.mozilla.org

11. Where do you intend to share the results of your analysis?

The analysis will be shared in a public bugzilla bug, and the analysis queries will be linked.

12. Is there a third-party tool (i.e. not Glean or Telemetry) that you
    are proposing to use for this data collection?

No.

data-review? @travis79

Data Review Form

  1. Is there or will there be documentation that describes the schema for the ultimate data set in a public, complete, and accurate way?

Yes, through the Glean Dictionary

  1. Is there a control mechanism that allows the user to turn the data collection on and off?

Yes, through the data-collection settings in the embedding application

  1. If the request is for permanent data collection, is there someone who will monitor the data over time?

N/A, collection set to expire in 6 months

  1. Using the category system of data types on the Mozilla wiki, what collection type of data do the requested measurements fall under?

Category 1, Technical Data

  1. Is the data collection request for default-on or default-off?

Default-on

  1. Does the instrumentation include the addition of any new identifiers?

No

  1. Is the data collection covered by the existing Firefox privacy notice?

Yes

  1. Does the data collection use a third-party collection tool?

No

Result

data-review+

@badboy
Copy link
Copy Markdown
Member Author

badboy commented May 13, 2026

This still need another update: we need to restrict it to Android builds, the only build where we can ensure libxul will be available in production.
I'll push the changes in a bit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants