1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
4 * You can obtain one at http://mozilla.org/MPL/2.0/.
9 [ChromeOnly, Exposed=Window]
10 interface GleanCategory {
12 * Get a metric by name.
14 * Returns an object of the corresponding metric type,
15 * with only the allowed functions available.
17 getter nsISupports (DOMString identifier);
20 [ChromeOnly, Exposed=Window]
23 * Get a metric category by name.
25 * Returns an object for further metric lookup.
27 getter GleanCategory (DOMString identifier);
30 [ChromeOnly, Exposed=Window]
31 interface GleanLabeled {
33 * Get a specific metric for a given label.
35 * If a set of acceptable labels were specified in the `metrics.yaml` file,
36 * and the given label is not in the set, it will be recorded under the
37 * special `OTHER_LABEL` label.
39 * If a set of acceptable labels was not specified in the `metrics.yaml` file,
40 * only the first 16 unique labels will be used.
41 * After that, any additional labels will be recorded under the special
42 * `OTHER_LABEL` label.
44 getter nsISupports (DOMString identifier);