Skip to content

Commit 9ffcfda

Browse files
authored
[doc only] Bug 1703280: Move metric parameter docs to the Glean Book (#303)
* [doc only] Bug 1703280: Move metric parameter docs to the Glean Book * Move metric parameter URL
1 parent dee1140 commit 9ffcfda

File tree

8 files changed

+21
-138
lines changed

8 files changed

+21
-138
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@ Parser tools for Mozilla's Glean telemetry.
44

55
## Features
66

7-
Parses the `metrics.yaml` files for the Glean telemetry SDK and produces
8-
output for various integrations.
7+
Contains various utilities for handling `metrics.yaml` and `pings.yaml` for [the
8+
Glean SDK](https://mozilla.github.io/glean). This includes producing generated
9+
code for various integrations, linting and coverage testing.
910

1011
## Documentation
1112

12-
The full documentation is available
13-
[here](https://mozilla.github.io/glean_parser/).
13+
- [User documentation for Glean](https://mozilla.github.io/glean/).
14+
- [`glean_parser` developer documentation](https://mozilla.github.io/glean_parser/).
1415

1516
## Requirements
1617

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
# Add any Sphinx extension module names here, as strings. They can be
3434
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
35-
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode', 'sphinxext.eval', 'recommonmark']
35+
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode', 'recommonmark']
3636

3737
# Add any paths that contain templates here, relative to this directory.
3838
templates_path = ['_templates']

docs/index.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ Glean parser
33

44
.. image:: _static/glean.jpeg
55

6+
This contains the developer documentation for `glean_parser`. Information about
7+
using Glean is available in [the Glean book](https://mozilla.github.io/glean).
8+
69
.. toctree::
710
:maxdepth: 2
811
:caption: Contents:

docs/metrics-yaml.rst

Lines changed: 1 addition & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,7 @@
11
``metrics.yaml`` file
22
=====================
33

4-
The ``metrics.yaml`` file defines what metrics and events your application will
5-
collect.
6-
7-
The top-level of the file must contain the following key-value pair to indicate
8-
that it is a Glean ``metrics.yaml`` file::
9-
10-
$schema: moz://mozilla.org/schemas/glean/metrics/2-0-0
11-
12-
The other keys at the top level of the file are category names. Category names
13-
must be in ``snake_case``, but may also contain ``.`` to indicate *ad hoc*
14-
subcategories. Category names have a maximum of 40 characters.
15-
16-
Within each category, the individual metrics are defined. The key is the name of
17-
the metric (``snake_case`` with a maximum of 30 characters), and each value is
18-
an object with the following parameters described below.
19-
20-
``metrics.yaml`` files must be encoded in UTF-8.
21-
22-
Metric parameters
23-
-----------------
24-
25-
.. metric_parameter:: type
26-
27-
.. metric_parameter:: description
28-
29-
.. metric_parameter:: notification_emails
30-
31-
.. metric_parameter:: bugs
32-
33-
.. metric_parameter:: data_reviews
34-
35-
.. metric_parameter:: lifetime
36-
37-
.. metric_parameter:: send_in_pings
38-
39-
.. metric_parameter:: disabled
40-
41-
.. metric_parameter:: expires
42-
43-
.. metric_parameter:: version
44-
45-
.. metric_parameter:: time_unit
46-
47-
.. metric_parameter:: labels
48-
49-
.. metric_parameter:: extra_keys
50-
51-
.. metric_parameter:: gecko_datapoint
52-
53-
.. metric_parameter:: no_lint
4+
Documentation for the ``metrics.yaml`` file has moved to `metrics parameters in the Glean user documentation <https://mozilla.github.io/glean/book/user/metric-parameters.html>`_.
545

556
JSON Schema
567
-----------

docs/pings-yaml.rst

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,7 @@
11
``pings.yaml`` file
22
===================
33

4-
The ``pings.yaml`` file defines what pings your application will collect.
5-
6-
The top-level of the file must contain the following key-value pair to indicate
7-
that it is a Glean ``pings.yaml`` file::
8-
9-
$schema: moz://mozilla.org/schemas/glean/pings/2-0-0
10-
11-
The other keys at the top level of the file are ping names.
12-
Ping names must be in ``kebab-case``.
13-
Ping names have a maximum of 30 characters.
14-
15-
Ping parameters
16-
---------------
17-
18-
.. ping_parameter:: description
19-
20-
.. ping_parameter:: include_client_id
21-
22-
.. ping_parameter:: send_if_empty
23-
24-
.. ping_parameter:: notification_emails
25-
26-
.. ping_parameter:: bugs
27-
28-
.. ping_parameter:: data_reviews
29-
30-
.. ping_parameter:: reasons
4+
Documentation for the ``pings.yaml`` file has moved to `custom pings in the Glean user documentation <https://mozilla.github.io/glean/book/user/pings/custom.html>`_.
315

326
JSON Schema
337
-----------

docs/sphinxext/eval.py

Lines changed: 0 additions & 56 deletions
This file was deleted.

glean_parser/schemas/metrics.1-0-0.schema.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,11 @@ definitions:
107107
properties: `range_min`, `range_max`, `bucket_count`,
108108
`histogram_type`.
109109
110+
- `rate`: Used to record the rate something happens relative to some
111+
other thing. For example, the number of HTTP connections that
112+
experience an error relative to the number of total HTTP
113+
connections made.
114+
110115
- Additionally, labeled versions of many metric types are supported.
111116
These support the `labels`_ parameter, allowing multiple instances
112117
of the metric to be stored at a given set of labels. The labeled

glean_parser/schemas/metrics.2-0-0.schema.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,11 @@ definitions:
105105
properties: `range_min`, `range_max`, `bucket_count`,
106106
`histogram_type`.
107107
108+
- `rate`: Used to record the rate something happens relative to some
109+
other thing. For example, the number of HTTP connections that
110+
experience an error relative to the number of total HTTP
111+
connections made.
112+
108113
- Additionally, labeled versions of many metric types are supported.
109114
These support the `labels`_ parameter, allowing multiple instances
110115
of the metric to be stored at a given set of labels. The labeled

0 commit comments

Comments
 (0)