Closed Bug 1934095 Opened 9 months ago Closed 9 months ago

Extend GIFFT (quietly) to support mirroring to histograms with `kind: boolean` and `kind: count`

Categories

(Toolkit :: Telemetry, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
135 Branch
Tracking Status
firefox135 --- fixed

People

(Reporter: chutten, Assigned: chutten)

References

Details

Attachments

(2 files)

If we hope to remove Legacy Telemetry's Histogram APIs and replace their use with Glean APIs, we need to be able to mirror to existing histogram types. Two as-yet-unsupported-by-GIFFT histogram types are kind: boolean (counts of truths and falsehoods) and kind: count (a simple count, which has been forbidden in favour of uint scalars for about eight years (bug 1278531), but nevertheless persists)

The way that Glean would expect you to encode "Histogram with kind: boolean" data would probably be labeled_counter with two fixed labels: one describing the true case and one describing the false case (like for APPLICATION_REPUTATION_SHOULD_BLOCK it could be should_block and shouldnt_block. Just pick something more descriptive than true and `false). This allows for more cases cropping up in the future.

The way that Glean would expect you to encode "Histogram with kind: count" data would definitely be a counter.

This bug is about designing and implementing and testing the ability to map from labeled_counter to Histograms with kind: boolean and from counter to Histograms with kind: counter. We will not be documenting these transforms as possible in the user-facing GIFFT docs because we don't want people adding new Histograms with kind: boolean or kind: counter. The former should be keyed scalars with kind: uint, and the latter non-keyed scalars with kind: uint.

Secret menu: It is possible to mirror from a counter metric to a Histogram
probe with kind "count" if you prefix the mirror's HistogramID with "h#".

Blocks: 1935420

Not only does it have to be a labeled_counter,
not only does it have to prepend its telemetry_mirror property with h#,
it also has to have a labels: ["false", "true"] (in that order),
and it'll assert on debug builds if you use it wrong.

Pushed by chutten@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3c665d65abf4 Support mirroring from counter metrics to count histograms r=TravisLong https://hg.mozilla.org/integration/autoland/rev/beab9166b295 Support mirroring specific labeled_counter metric to histograms of kind: boolean r=TravisLong
Status: ASSIGNED → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → 135 Branch
Depends on: 1941763
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: