Allow restricting histogram keys to a known set in Histograms.json

Georg Fritzsche gfritzsche at mozilla.com
Thu Mar 2 14:18:24 UTC 2017


Originally we added keyed histograms to allow using string keys that were
not all known before.
However, we have use-cases were it makes sense to use the two-level keyed
histogram structure (name, key), even when the set of keys is known before
(e.g. to share common definitions).

So in bug 1343855 <https://bugzilla.mozilla.org/show_bug.cgi?id=1343855> we
plan to add an additional optional field "keys" for keyed histograms that
allows specifying the valid key strings.
Any recording to the histogram with an invalid key string will be ignored
and a warning/error be print

E.g. consider:
"STORAGE_UPDATE_RESULT": {
  "keyed": true,
  "kind": "categorical",
  "keys": ["blocklists.addons", "blocklists.certificates", "pinning.pins"],
  "labels": ["success", "backoff", "network_error", "server_error",
"sign_error"],
  ...
}

Without using a keyed histogram, the label definition would be repeated
over multiple histogram definitions.

Feedback, concerns?

Georg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/fhr-dev/attachments/20170302/1c064d1f/attachment.html>


More information about the fhr-dev mailing list