Extend GIFFT (quietly) to support mirroring to histograms with `kind: boolean` and `kind: count`
Categories
(Toolkit :: Telemetry, enhancement, P1)
Tracking
()
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
.
Assignee | ||
Comment 1•9 months ago
|
||
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#".
Assignee | ||
Comment 2•9 months ago
|
||
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.
https://hg.mozilla.org/mozilla-central/rev/3c665d65abf4
https://hg.mozilla.org/mozilla-central/rev/beab9166b295
Description
•