Closed Bug 1937186 Opened 8 months ago Closed 6 months ago

Determine how to migrate histograms that clear themselves in non-test code: PWMGR_* in _gatherTelemetry()

Categories

(Toolkit :: Password Manager, task, P1)

task

Tracking

()

RESOLVED FIXED
137 Branch
Tracking Status
firefox137 --- fixed

People

(Reporter: chutten, Assigned: chutten)

References

Details

(Whiteboard: [fog-migration])

Attachments

(1 file)

In our effort to migrate histograms to use Glean APIs in bug 1935420 we've found some uses of the JS per-histogram clear() API in non-test contexts. We're not entirely certain what to do about these uses without the aid of the people who own them.

For this bug we're specifically looking at the histograms being written to in _gatherTelemetry() in LoginManager.sys.mjs:

  • PWMGR_BLOCKLIST_NUM_SITES
  • PWMGR_NUM_SAVED_PASSWORDS
  • PWMGR_NUM_HTTPAUTH_PASSWORDS
  • PWMGR_SAVING_ENABLED
  • PWMGR_USERNAME_PRESENT
  • PWMGR_LOGIN_LAST_USED_DAYS
  • PWMGR_NUM_PASSWORDS_PER_HOSTNAME

Some questions:

  • Are the data generated by these instrumentation in use?
    • Because if they're not, we can just remove them and be on our merry way.
  • Can we encode this data in a different way to continue satisfying the same uses, or is it important that they all e.g. remain histograms despite holding single values?
    • If we can, then we'll move these to Scalars if you'd like them to remain in Legacy Telemetry, or just to Glean if you don't need them in there any more.
    • We'll need to decide about PWMGR_NUM_PASSWORDS_PER_HOSTNAME independently since it does actually record multiple values, albeit in a very non-histogram way -- if its data is important to keep static independent of the frequency that _gatherTelemetry is called, we've got some work ahead of us.

:mkmelin, as someone who has touched this file somewhat recently, would you happen to know the answers to these questions? Or to whom we should instead direct them?

Flags: needinfo?(mkmelin+mozilla)

Unfortunately I know very little about it. I don't think Thunderbird cares about this telemetry data.

Passing the buck (wild guess)

Flags: needinfo?(mkmelin+mozilla) → needinfo?(mtigley)

Thanks! Let me check with the team to see what we want to do with this telemetry.

One question: Chris do you know when and how often this idle-daily notification is dispatched to the main thread?

Flags: needinfo?(mtigley)
Flags: needinfo?(chutten)

"idle-daily" is notified the first 3min-wide idle period that is 24h after the previous "idle-daily" notification, at least according to my reading of this code.

(( Now, I did also in looking this up just find that DiscoveryStream might also notify on its own recognizance for some reason? I haven't found anything that actually triggers that, so maybe this is dead code. But still. Wow. ))

So, in full, "gather-telemetry" should happen once a day, tops. But also note the comment: it shouldn't matter overmuch how frequently it happens because it'll stop happening at all as soon as bug 1127907 lands. Which I'm sure will be any decade now.

Flags: needinfo?(chutten)
Flags: needinfo?(mtigley)
Whiteboard: [fog-migration]
Blocks: 1944631
No longer blocks: 1935420

:mtigley in conversation on Slack agrees that we could delete the existing probes entirely so long as we still report the number of passwords somewhere, especially if solely in Glean.

I hope to have a patch that does this up soonish.

Flags: needinfo?(mtigley)

PWMGR_SAVING_ENABLED and PWMGR_NUM_SAVED_PASSWORDS are removed,
with Glean alternatives implemented. The new metrics always have the correct
value and will report them in every "metrics" ping.

PWMGR_BLOCKLIST_NUM_SITES, PWMGR_NUM_HTTPAUTH_PASSWORDS,
PWMGR_USERNAME_PRESENT, PWMGR_LOGIN_LAST_USED_DAYS, and
PWMGR_NUM_PASSWORDS_PER_HOSTNAME are merely removed.

Blocks: 1950710
Pushed by chutten@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/525ebaf50f43 Migrate PWMGR_* histograms relying on clear() r=mtigley
Backout by agoloman@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/34e5c0e09e46 Backed out changeset 525ebaf50f43 for causing mass failures. CLOSED TREE

Backed out for causing causing mass failures.

Flags: needinfo?(chutten)

Oh, LoginHelper is used on child processes? Okay, should just be a one-line fix.

Flags: needinfo?(chutten)
Pushed by chutten@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7131829268b5 Migrate PWMGR_* histograms relying on clear() r=dimi,mtigley
Status: ASSIGNED → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → 137 Branch
No longer blocks: 1950710
See Also: → 1958067
Regressions: 1971380
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: