Open Bug 1628897 Opened 4 years ago Updated 4 years ago

Allow rusqlite connections to report mozstorage telemetry

Categories

(Toolkit :: Storage, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: tcsc, Unassigned)

References

Details

(Whiteboard: SACI)

Rusqlite is now in m-c as of bug 1626323. SACI team intends to use it for the replaced extension storage.

Most obvious thing that comes to mind is slow statement telemetry. This will require some way of hooking into rusqlite statement stepping.

No work is needed for:

  • MEMORY_STORAGE_SQLITE histogram: collected via sqlite3_memory_used (e.g. automatic).
  • MOZ_SQLITE_${THING}_MS histograms: These are collected by the telemetry VFS, and rusqlite supports using custom VFSes.

Possibly more things, still investigating.

Oooh, yes! This would be amazing to capture in about:telemetry#slow-sql-tab at the least, and, if we can push on getting it structured in BQ, would let us create dashboards. And, if we end up tweaking rusqlite to support this, could we also use the same infra in a-s to get slow SQL reports from Fenix?

Linking some vaguely-related slow SQL telemetry bugs for more background.

See Also: → 1592263, 1594264

Reporting on corrupt databases would be super valuable, too.

See Also: → 1635489

What kind of reporting do you imagine?

Oh, I was just thinking of making sure we support whatever bug 1635489 does! 😂 Looks like file corruption, disk errors, and access errors specifically.

(In reply to Thom Chiovoloni [:tcsc] (please ni?) from comment #0)

  • MOZ_SQLITE_${THING}_MS histograms: These are collected by the telemetry VFS, and rusqlite supports using custom VFSes.

These are supposed to be removed from mozStorage as well. See Bug 1065923. After the initial effort to reduce main-thread IO, we didn't find them particularly useful, contrary to specific slow queries.

Severity: normal → S3
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.