<div dir="ltr"><div>Originally we added keyed histograms to allow using string keys that were not all known before.<br>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).<br></div><div><br>So in <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1343855">bug 1343855</a> we plan to add an additional optional field "keys" for keyed histograms that allows specifying the valid key strings.<br></div><div>Any recording to the histogram with an invalid key string will be ignored and a warning/error be print<br></div><div><br>E.g. consider:<br><div>"STORAGE_UPDATE_RESULT": {<br></div>  "keyed": true,<br></div><div>  "kind": "categorical",<br></div><div>  "keys": ["blocklists.addons", "blocklists.certificates", "pinning.pins"],<br></div><div>  "labels": ["success", "backoff", "network_error", "server_error", "sign_error"],<br>  ...<br>}<br><br></div><div>Without using a keyed histogram, the label definition would be repeated over multiple histogram definitions.<br><br></div><div>Feedback, concerns?<br><br></div><div>Georg<br></div></div>