Debian Codegraph @

third_party/python/glean_parser/glean_parser-17.1.0.dist-info/METADATA

raw
1 Metadata-Version: 2.1
2 Name: glean_parser
3 Version: 17.1.0
4 Summary: Parser tools for Mozilla's Glean telemetry
5 Home-page: https://github.com/mozilla/glean_parser
6 Author: The Glean Team
7 Author-email: [email protected]
8 Keywords: glean_parser
9 Classifier: Development Status :: 5 - Production/Stable
10 Classifier: Intended Audience :: Developers
11 Classifier: Natural Language :: English
12 Classifier: Programming Language :: Python :: 3
13 Classifier: Programming Language :: Python :: 3.8
14 Classifier: Programming Language :: Python :: 3.9
15 Classifier: Programming Language :: Python :: 3.10
16 Classifier: Programming Language :: Python :: 3.11
17 Classifier: Programming Language :: Python :: 3.12
18 Description-Content-Type: text/markdown
19 License-File: LICENSE
20 License-File: AUTHORS.md
21 Requires-Dist: Click>=7
22 Requires-Dist: diskcache>=4
23 Requires-Dist: Jinja2>=2.10.1
24 Requires-Dist: jsonschema>=3.0.2
25 Requires-Dist: platformdirs>=2.4.0
26 Requires-Dist: PyYAML>=5.3.1
27
28 # Glean Parser
29
30 Parser tools for Mozilla's Glean telemetry.
31
32 ## Features
33
34 Contains various utilities for handling `metrics.yaml` and `pings.yaml` for [the
35 Glean SDKs](https://mozilla.github.io/glean). This includes producing generated
36 code for various integrations, linting and coverage testing.
37
38 ## Documentation
39
40 - [How to Contribute](https://github.com/mozilla/glean_parser/blob/main/CONTRIBUTING.md). Please file bugs in [bugzilla](https://bugzilla.mozilla.org/enter_bug.cgi?assigned_to=nobody%40mozilla.org&bug_ignored=0&bug_severity=normal&bug_status=NEW&cf_fission_milestone=---&cf_fx_iteration=---&cf_fx_points=---&cf_status_firefox65=---&cf_status_firefox66=---&cf_status_firefox67=---&cf_status_firefox_esr60=---&cf_status_thunderbird_esr60=---&cf_tracking_firefox65=---&cf_tracking_firefox66=---&cf_tracking_firefox67=---&cf_tracking_firefox_esr60=---&cf_tracking_firefox_relnote=---&cf_tracking_thunderbird_esr60=---&product=Data%20Platform%20and%20Tools&component=Glean%3A%20SDK&contenttypemethod=list&contenttypeselection=text%2Fplain&defined_groups=1&flag_type-203=X&flag_type-37=X&flag_type-41=X&flag_type-607=X&flag_type-721=X&flag_type-737=X&flag_type-787=X&flag_type-799=X&flag_type-800=X&flag_type-803=X&flag_type-835=X&flag_type-846=X&flag_type-855=X&flag_type-864=X&flag_type-916=X&flag_type-929=X&flag_type-930=X&flag_type-935=X&flag_type-936=X&flag_type-937=X&form_name=enter_bug&maketemplate=Remember%20values%20as%20bookmarkable%20template&op_sys=Unspecified&priority=P3&&rep_platform=Unspecified&status_whiteboard=%5Btelemetry%3Aglean-rs%3Am%3F%5D&target_milestone=---&version=unspecified).
41 - [User documentation for Glean](https://mozilla.github.io/glean/).
42 - [`glean_parser` developer documentation](https://mozilla.github.io/glean_parser/).
43
44 ## Requirements
45
46 - Python 3.8 (or later)
47
48 The following library requirements are installed automatically when
49 `glean_parser` is installed by `pip`.
50
51 - Click
52 - diskcache
53 - Jinja2
54 - jsonschema
55 - platformdirs
56 - PyYAML
57
58 ## Usage
59
60 ```sh
61 $ glean_parser --help
62 ```
63
64 Read in `metrics.yaml`, translate to Kotlin format, and
65 output to `output_dir`:
66
67 ```sh
68 $ glean_parser translate -o output_dir -f kotlin metrics.yaml
69 ```
70
71 Check a Glean ping against the ping schema:
72
73 ```sh
74 $ glean_parser check < ping.json
75 ```
76
77
78 # Changelog
79
80 ## Unreleased
81
82 ## 17.1.0
83
84 - Permit object metrics named 'glean.attribution.ext' or 'glean.distribution.ext' even if allow_reserved is false ([bug 1955428](https://bugzilla.mozilla.org/show_bug.cgi?id=1955428))
85
86 ## 17.0.1
87
88 - BUGFIX: Fix missing `ping_arg` "`uploader_capabilities`" in util.py ([#786](https://github.com/mozilla/glean_parser/pull/786))
89
90 ## 17.0.0
91
92 - BREAKING CHANGE: Support `uploader_capabilities` for pings ([bug 1920732](https://bugzilla.mozilla.org/show_bug.cgi?id=1920732))
93
94 ## 16.2.0
95
96 - New lint: error when there are metrics whose names are too similar ([bug 1934099](https://bugzilla.mozilla.org/show_bug.cgi?id=1934099))
97 - Require `array` or `object` as the root type in object metrics ([#780](https://github.com/mozilla/glean_parser/pull/780))
98 - Remove 100-bucket limit for `custom_distribution` metrics ([bug 1940967](https://bugzilla.mozilla.org/show_bug.cgi?id=1940967))
99
100 ## 16.1.0
101
102 - Allow specifying a subset of interesting metrics to actually collect. Other metrics will be built, but marked as disabled ([bug 1931277](https://bugzilla.mozilla.org/show_bug.cgi?id=1911165)).
103
104 ## 16.0.0
105
106 - BREAKING CHANGE: Support `follows_collection_enabled` for pings ([#776](https://github.com/mozilla/glean_parser/pull/776))
107 - Add rust_server feature to glean_parser to allow Rust server-side metrics ([#772](https://github.com/mozilla/glean_parser/pull/772))
108 - Replace `panic`s with returned errors (`go_server`) ([#777](https://github.com/mozilla/glean_parser/pull/777))
109 - Enable configurable Writer for log output (`go_server`) ([#775](https://github.com/mozilla/glean_parser/pull/775))
110
111 ## 15.2.1
112
113 - Allow earlier versions of platformdirs ([#769](https://github.com/mozilla/glean_parser/pull/769))
114
115 ## 15.2.0
116
117 - New Metric Type: `labeled_quantity` ([bug 1925346](https://bugzilla.mozilla.org/show_bug.cgi?id=1925346))
118
119 ## 15.1.0
120
121 - Bugfix: Remove unused keyword argument from exception ([#755](https://github.com/mozilla/glean_parser/pull/755))
122 - Add Go log outputter support for custom pings (`go_server`) ([#758](https://github.com/mozilla/glean_parser/pull/758))
123
124 ## 15.0.1
125
126 - Rust codegen: use correctly named parameter for events without extras ([#750](https://github.com/mozilla/glean_parser/pull/750))
127
128 ## 15.0.0
129
130 - **Breaking change:** Updating Kotlin template import statement as part of removing `service-glean` from Android Components. ([bug 1906941](https://bugzilla.mozilla.org/show_bug.cgi?id=1906941))
131 - **Breaking change:** Do not generate Geckoview Streaming helper code ([#743](https://github.com/mozilla/glean_parser/pull/743))
132
133 ## 14.5.2
134
135 - Revert updating Kotlin template import statement as part of removing `service-glean` from Android Components.
136 This change was BREAKING. It will be reintroduced in a major release afterwards ([#744](https://github.com/mozilla/glean_parser/pull/744))
137
138 ## 14.5.1
139
140 - BUGFIX: Rust object metrics: Accept `null` in place of empty arrays
141
142 ## 14.5.0
143
144 - BUGFIX: Fix Rust codegen to properly handle events with multiple types of extras ([bug 1911165](https://bugzilla.mozilla.org/show_bug.cgi?id=1911165))
145 - Updating Kotlin template import statement as part of removing `service-glean` from Android Components. ([bug 1906941](https://bugzilla.mozilla.org/show_bug.cgi?id=1906941))
146
147 ## 14.4.0
148
149 - Fix JS and Ruby server templates to correctly send event extra values as strings ([DENG-4405](https://mozilla-hub.atlassian.net/browse/DENG-4405))
150 - ENHANCEMENT: Extra keys in `extra_keys:` fields may now contain any printable ASCII characters ([bug 1910976](https://bugzilla.mozilla.org/show_bug.cgi?id=1910976))
151
152 ## 14.3.0
153
154 - Add the `module_spec` option to the javascript_server outputter ([#726](https://github.com/mozilla/glean_parser/pull/726))
155 - BUGFIX: Fix the Rust codegen for changes to how `labeled_*` metrics are constructed ([bug 1909244](https://bugzilla.mozilla.org/show_bug.cgi?id=1909244))
156 - Generate a serializer for array wrappers ([bug 1908157](https://bugzilla.mozilla.org/show_bug.cgi?id=1908157))
157
158 ## 14.2.0
159
160 - New Metric Types: `labeled_{custom|memory|timing}_distribution` ([bug 1657947](https://bugzilla.mozilla.org/show_bug.cgi?id=1657947))
161
162 ## 14.1.3
163
164 - Fix Kotlin/Swift code generation for object metrics, now generating top-level typealiases where needed ([#722](https://github.com/mozilla/glean_parser/pull/722))
165
166 ## 14.1.2
167
168 - ping schedule: Gracefully handle missing ping ([#705](https://github.com/mozilla/glean_parser/pull/705))
169
170 ## 14.1.1
171
172 - Replace deprecated methods and package ([#699](https://github.com/mozilla/glean_parser/pull/699))
173
174 ## 14.1.0
175
176 - Add Go log outputter support for datetime (`go_server`) ([#693](https://github.com/mozilla/glean_parser/pull/693))
177
178 ## 14.0.1
179
180 - BUGFIX: Fix missing `ping_arg` in util.py ([#687](https://github.com/mozilla/glean_parser/pull/687))
181
182 ## 14.0.0
183
184 - BREAKING CHANGE: Expose the optional `enabled` property on pings, defaulting to `enabled: true` ([#681](https://github.com/mozilla/glean_parser/pull/681))
185 - BREAKING CHANGE: Support metadata field `ping_schedule` for pings ([bug 1804711](https://bugzilla.mozilla.org/show_bug.cgi?id=1804711))
186 - Add support for event metric type in server JavaScript outputter ([DENG-2407](https://mozilla-hub.atlassian.net/browse/DENG-2407))
187 - Add Swift and Kotlin codegen support for the object metric type object ([#685](https://github.com/mozilla/glean_parser/pull/685))
188
189 ## 13.0.1
190
191 - Use faster C yaml parser if available ([#677](https://github.com/mozilla/glean_parser/pull/677))
192
193 ## 13.0.0
194
195 - BREAKING CHANGE: Support metadata field `include_info_sections` ([bug 1866559](https://bugzilla.mozilla.org/show_bug.cgi?id=1866559))
196
197 ## 12.0.1
198
199 - Fix Rust codegen for object metric type ([#662](https://github.com/mozilla/glean_parser/pull/662))
200
201 ## 12.0.0
202
203 - Add new metric type object (only Rust codegen support right now) ([#587](https://github.com/mozilla/glean_parser/pull/587))
204
205 ## 11.1.0
206
207 - Add Go log outputter (`go_server`) ([#645](https://github.com/mozilla/glean_parser/pull/645))
208 - Add Python log outputter (`python_server`) ([MPP-3642](https://mozilla-hub.atlassian.net/browse/MPP-3642))
209
210 ## 11.0.1
211
212 - Fix javascript_server template to include non-event metric parameters in #record call for event metrics ([#643](https://github.com/mozilla/glean_parser/pull/643))
213 - events: Increase extra key limit to 50 ([Bug 1869429](https://bugzilla.mozilla.org/show_bug.cgi?id=1869429))
214
215 ## 11.0.0
216
217 - Add updated logging logic for Ruby Server ([#642](https://github.com/mozilla/glean_parser/pull/642))
218 - Add support for event metric type in server-side JavaScript outputter ([DENG-1736](https://mozilla-hub.atlassian.net/browse/DENG-1736))
219 - BREAKING CHANGE: Dropped support for Python 3.7 ([#638](https://github.com/mozilla/glean_parser/pull/638))
220 - Add official support for Python 3.11+ ([#638](https://github.com/mozilla/glean_parser/pull/638))
221
222 ## 10.0.3
223
224 - Warn about empty or TODO-tagged data reviews in the list ([#634](https://github.com/mozilla/glean_parser/pull/634))
225 - Allow `unit` field on all metrics, but warn for all but quantity and custom distribution ([#636](https://github.com/mozilla/glean_parser/pull/636))
226
227 ## 10.0.2
228
229 - Allow `unit` field for string again, but warn about it in the linter ([#634](https://github.com/mozilla/glean_parser/pull/634))
230
231 ## 10.0.1
232
233 - Allow `unit` field for custom distribution again ([#633](https://github.com/mozilla/glean_parser/pull/633))
234
235 ## 10.0.0
236
237 - Add Ruby log outputter (`ruby_server`) ([#620](https://github.com/mozilla/glean_parser/pull/620))
238 - BREAKING CHANE: `ping` lifetime metrics on the events ping are now disallowed ([#625](https://github.com/mozilla/glean_parser/pull/625))
239 - Disallow `unit` field for anything but quantity ([#630](https://github.com/mozilla/glean_parser/pull/630)).
240 Note that this was already considered the case, now the code enforces it.
241
242 ## 9.0.0
243
244 - BREAKING CHANGE: Dropped support for Python 3.6 ([#615](https://github.com/mozilla/glean_parser/issues/615))
245 - Allow metadata to configure precise timestamps in pings ([#592](https://github.com/mozilla/glean_parser/pull/592))
246
247 ## 8.1.1
248
249 - Small updates to the `javascript_server` tempalte to address lint warnings ([#598](https://github.com/mozilla/glean_parser/pull/598))
250
251 ## 8.1.0
252
253 - Increased the maximum metric name length in version 2.0.0 schema ([#596](https://github.com/mozilla/glean_parser/pull/596))
254
255 ## 8.0.0
256
257 - BREAKING CHANGE: Remove exposed `lint_yaml_files` function ([#580](https://github.com/mozilla/glean_parser/pull/580))
258 - Rust: Removed `__glean_metric_maps` from the Rust Jinja template. This functionality is better placed downstream ([Bug 1816526](https://bugzilla.mozilla.org/show_bug.cgi?id=1816526))
259 - New lint: check that all referenced pings are known ([#584](https://github.com/mozilla/glean_parser/pull/584))
260 - Add experimental server-side JavaScript outputter ([FXA-7922](https://mozilla-hub.atlassian.net/browse/FXA-7922))
261
262 ## 7.2.1
263
264 - Unbreak last minor release ([#579](https://github.com/mozilla/glean_parser/pull/579))
265
266 ## 7.2.0
267
268 - Remove yamllint integration ([#578](https://github.com/mozilla/glean_parser/pull/578))
269
270 ## 7.1.0
271
272 - ENHANCEMENT: Labels in `labels:` fields may now contain any printable ASCII characters ([bug 1672273](https://bugzilla.mozilla.org/show_bug.cgi?id=1672273))
273 - BUGFIX: Enforce ordering of generation of Pings, Metrics and Tags such that order is deterministic ([bug 1820334](https://bugzilla.mozilla.org/show_bug.cgi?id=1820334))
274
275 ## 7.0.0
276
277 - BUGFIX: Remove internal-only fields from serialized metrics data ([#550](https://github.com/mozilla/glean_parser/pull/550))
278 - FEATURE: New subcommand: `dump` to dump the metrics data as JSON ([#550](https://github.com/mozilla/glean_parser/pull/550))
279 - BUGFIX: Kotlin: Generate enums with the right generic bound for ping reason codes ([#551](https://github.com/mozilla/glean_parser/pull/551)).
280 - **BREAKING CHANGE:** Fully remove support for the old events API ([#549](https://github.com/mozilla/glean_parser/pull/549))
281 Adds a new lint `OLD_EVENT_API` to warn about missing `type` attributes on event extra keys.
282 Note that the Glean SDK already dropped support for the old events API.
283
284 ## 6.4.0
285
286 - BUGFIX: Correct code generation for labeled metrics in Rust ([#533](https://github.com/mozilla/glean_parser/pull/533))
287 - BUGFIX: Correctly serialize `Rates` for Rust code ([#530](https://github.com/mozilla/glean_parser/pull/530))
288 - Feature: Wrap labeled metric's static labels list as CoW strings (requires updated Glean support) ([#534](https://github.com/mozilla/glean_parser/pull/534))
289
290 ## 6.3.0
291
292 - events: Increase extras limit to 15 ([bug 1798713](https://bugzilla.mozilla.org/show_bug.cgi?id=1798713))
293
294 ## 6.2.1
295
296 - Add support for Rate, Denominator and Numerator metrics for JavaScript. ([bug 1793777](https://bugzilla.mozilla.org/show_bug.cgi?id=1793777))
297
298 ## 6.2.0
299
300 - [data-review] Use a template to generate the Data Review Request template ([bug 1772605](https://bugzilla.mozilla.org/show_bug.cgi?id=1772605))
301 - Make tag and no\_lint order deterministic ([#518](https://github.com/mozilla/glean_parser/pull/518))
302
303 ## 6.1.2
304
305 - Swift: Add a conditional `import Foundation` to support generating metrics when Glean is delivered via the AppServices iOS megazord
306
307 ## 6.1.1
308
309 - Rust: Use correct name for a ping in generated code.
310
311 ## 6.1.0
312
313 - [data-review] Include extra keys' names and descriptions in data review template ([bug 1767027](https://bugzilla.mozilla.org/show_bug.cgi?id=1767027))
314 - Raise limit on number of statically-defined labels to 4096. ([bug 1772163](https://bugzilla.mozilla.org/show_bug.cgi?id=1772163))
315 - Fix Rust code generation for new UniFFI interface ([#491](https://github.com/mozilla/glean_parser/pull/491), [#494](https://github.com/mozilla/glean_parser/pull/494), [#495](https://github.com/mozilla/glean_parser/pull/495))
316
317 ## 6.0.1
318
319 - Relax version requirement for MarkupSafe.
320 Now works with MarkupSafe v1.1.1 to v2.0.1 inclusive again.
321
322 ## 6.0.0
323
324 - BUGFIX: Add missing `extra_args` to Rust constructor generation ([bug 1765855](https://bugzilla.mozilla.org/show_bug.cgi?id=1765855))
325 - **Breaking change:** `glean_parser` now generates metrics compatible with the UniFFI-powered Glean SDK.
326 This is not backwards-compatible with previous versions.
327 - Generate Rate, Denominator and Numerator metrics for Kotlin and Swift
328 - Explicitly skip Rate, Denominator and Numerator metrics for JavaScript.
329 These will cause a build failure by default, but can be turned into warnings on request.
330 Use `-s fail_rates=false` to enable warning-only mode.
331
332 ## 5.1.2
333
334 - BUGFIX: Revert changes made on v5.1.1.
335 - The issues addressed by those changes, were non-issues and result of misuse of the APIs.
336
337 ## 5.1.1
338
339 - BUGFIX: Fix issues with Swift templates ([bug 1749494](https://bugzilla.mozilla.org/show_bug.cgi?id=1749494))
340 - Make metrics and pings all `public`
341 - Make pings `static`
342
343 ## 5.1.0
344
345 - Add support for build info generation for JavaScript and Typescript targets ([bug 1749494](https://bugzilla.mozilla.org/show_bug.cgi?id=1749494))
346
347 ## 5.0.1
348
349 - Fix the logic for the metric expiration by version ([bug 1753194](https://bugzilla.mozilla.org/show_bug.cgi?id=1753194))
350
351 ## 5.0.0
352
353 - Remove C# support ([#436](https://github.com/mozilla/glean_parser/pull/436)).
354 - Add support for Rust code generation ([bug 1677434](https://bugzilla.mozilla.org/show_bug.cgi?id=1677434))
355 - Report an error if no files are passed ([bug 1751730](https://bugzilla.mozilla.org/show_bug.cgi?id=1751730))
356 - [data-review] Report an error if no metrics match provided bug number ([bug 1752576](https://bugzilla.mozilla.org/show_bug.cgi?id=1752576))
357 - [data-review] Include notification_emails in list of those responsible ([bug 1752576](https://bugzilla.mozilla.org/show_bug.cgi?id=1752576))
358 - Add support for expiring metrics by the provided major version ([bug 1753194](https://bugzilla.mozilla.org/show_bug.cgi?id=1753194))
359
360 ## 4.4.0
361
362 - Support global file-level tags in metrics.yaml ([bug 1745283](https://bugzilla.mozilla.org/show_bug.cgi?id=1745283))
363 - Glinter: Reject metric files if they use `unit` by mistake. It should be `time_unit` ([#432](https://github.com/mozilla/glean_parser/pull/432)).
364 - Automatically generate a build date when generating build info ([#431](https://github.com/mozilla/glean_parser/pull/431)).
365 Enabled for Kotlin and Swift.
366 This can be changed with the `build_date` command line option.
367 `build_date=0` will use a static unix epoch time.
368 `build_date=2022-01-03T17:30:00` will parse the ISO8601 string to use (as a UTC timestamp).
369 Other values will throw an error.
370
371 Example:
372
373 glean_parser translate --format kotlin --option build_date=2021-11-01T01:00:00 path/to/metrics.yaml
374
375 ## 4.3.1
376
377 - BUGFIX: Skip tags for code generation ([#409](https://github.com/mozilla/glean_parser/pull/409))
378
379 ## 4.3.0
380
381 - Support tags in glean parser ([bug 1734011](https://bugzilla.mozilla.org/show_bug.cgi?id=1734011))
382
383 ## 4.2.0
384
385 - Improve the schema validation error messages. They will no longer include `OrderedDict(...)` on Python 3.7 and later ([bug 1733395](https://bugzilla.mozilla.org/show_bug.cgi?id=1733395))
386 - Officially support Python 3.10
387
388 ## 4.1.1 (2021-09-28)
389
390 - Update private import paths on Javascript / Typescript templates. ([bug 1702468](https://bugzilla.mozilla.org/show_bug.cgi?id=1702468))
391
392 ## 4.1.0 (2021-09-16)
393
394 - Add support for Node.js platform on Javascript / Typescript templates. ([bug 1728982](https://bugzilla.mozilla.org/show_bug.cgi?id=1728982))
395
396 ## 4.0.0 (2021-08-20)
397
398 - Add support for Text metric type ([#374](https://github.com/mozilla/glean_parser/pull/374))
399 - Reserve the `default` ping name. It can't be used as a ping name, but it can be used in `send_in_pings` ([#376](https://github.com/mozilla/glean_parser/pull/376))
400
401 ## 3.8.0 (2021-08-18)
402
403 - Expose ping reasons enum on JavaScript / TypeScript templates. ([bug 1719136](https://bugzilla.mozilla.org/show_bug.cgi?id=1719136))
404 - Define an interface with the allowed extras for each event on the TypeScript template. ([bug 1693487](https://bugzilla.mozilla.org/show_bug.cgi?id=1693487))
405
406 ## 3.7.0 (2021-07-13)
407
408 - New lint: Check for redundant words in ping names ([#355](https://github.com/mozilla/glean_parser/pull/355))
409 - Add support for URL metric type ([#361](https://github.com/mozilla/glean_parser/pull/361))
410
411 ## 3.6.0 (2021-06-11)
412
413 - Add a command `data-review` to generate a skeleton Data Review Request for all metrics matching a supplied bug number. ([bug 1704541](https://bugzilla.mozilla.org/show_bug.cgi?id=1704541))
414 - Enable custom distribution outside of GeckoView (`gecko_datapoint` becomes optional)
415
416 ## 3.5.0 (2021-06-03)
417
418 - Transform generated folder into QML Module when building Javascript templates for the Qt platform. ([bug 1707896](https://bugzilla.mozilla.org/show_bug.cgi?id=1707896)
419 - Import the Glean QML module from inside each generated file, removing the requirement to import Glean before importing any of the generated files;
420 - Prodive a `qmldir` file exposing all generated files;
421 - Drop the `namespace` option for Javascript templates;
422 - Add a new `version` option for Javascript templates, required when building for Qt, which expected the Glean QML module version.
423
424 ## 3.4.0 (2021-05-28)
425
426 - Add missing import for Kotlin code ([#339](https://github.com/mozilla/glean_parser/pull/339))
427 - Use a plain Kotlin type in the generated interface implementation ([#339](https://github.com/mozilla/glean_parser/pull/339))
428 - Generate additional generics for event metrics ([#339](https://github.com/mozilla/glean_parser/pull/339))
429 - For Kotlin skip generating `GleanBuildInfo.kt` when requested (with `with_buildinfo=false`) ([#341](https://github.com/mozilla/glean_parser/pull/341))
430
431 ## 3.3.2 (2021-05-18)
432
433 - Fix another bug in the Swift code generation when generating extra keys ([#334](https://github.com/mozilla/glean_parser/pull/334))
434
435 ## 3.3.1 (2021-05-18)
436
437 - Fix Swift code generation bug for pings ([#333](https://github.com/mozilla/glean_parser/pull/333))
438
439 ## 3.3.0 (2021-05-18)
440
441 - Generate new event API construct ([#321](https://github.com/mozilla/glean_parser/pull/321))
442
443 ## 3.2.0 (2021-04-28)
444
445 - Add option to add extra introductory text to generated markdown ([#298](https://github.com/mozilla/glean_parser/pull/298))
446 - Add support for Qt in Javascript templates ([bug 1706252](https://bugzilla.mozilla.org/show_bug.cgi?id=1706252))
447 - Javascript templates will now accept the `platform` option. If this option is set to `qt`
448 the generated templates will be Qt compatible. Default value is `webext`.
449
450 ## 3.1.2 (2021-04-21)
451
452 - BUGFIX: Remove the "DO NOT COMMIT" notice from the documentation.
453
454 ## 3.1.1 (2021-04-19)
455
456 - Recommend to not commit as well as to not edit the generated files. ([bug 1706042](https://bugzilla.mozilla.org/show_bug.cgi?id=1706042))
457 - BUGFIX: Include import statement for labeled metric subtypes in Javascript and Typescript templates.
458
459 ## 3.1.0 (2021-04-16)
460
461 - Add support for labeled metric types in Javascript and Typescript templates.
462
463 ## 3.0.0 (2021-04-13)
464
465 - Raise limit on number of statically-defined lables to 100. ([bug 1702263](https://bugzilla.mozilla.org/show_bug.cgi?id=1702263))
466 - BUGFIX: Version 2.0.0 of the schema now allows the "special" `glean_.*` ping names for Glean-internal use again.
467 - Remove support for JWE metric types.
468
469 ## 2.5.0 (2021-02-23)
470
471 - Add parser and object model support for `rate` metric type. ([bug 1645166](https://bugzilla.mozilla.org/show_bug.cgi?id=1645166))
472 - Add parser and object model support for telemetry_mirror property. ([bug 1685406](https://bugzilla.mozilla.org/show_bug.cgi?id=1685406))
473 - Update the Javascript template to match Glean.js expectations. ([bug 1693516](https://bugzilla.mozilla.org/show_bug.cgi?id=1693516))
474 - Glean.js has updated it's export strategy. It will now export each metric type as an independent module;
475 - Glean.js has dropped support for non ES6 modules.
476 - Add support for generating Typescript code. ([bug 1692157](https://bugzilla.mozilla.org/show_bug.cgi?id=1692157))
477 - The templates added generate metrics and pings code for Glean.js.
478
479 ## 2.4.0 (2021-02-18)
480
481 - **Experimental:** `glean_parser` has a new subcommand `coverage` to convert raw coverage reports
482 into something consumable by coverage tools, such as codecov.io
483 - The path to the file that each metric is defined in is now stored on the
484 `Metric` object in `defined_in["filepath"]`.
485
486 ## 2.3.0 (2021-02-17)
487
488 - Leverage the `glean_namespace` to provide correct import when building for Javascript.
489
490 ## 2.2.0 (2021-02-11)
491
492 - The Kotlin generator now generates static build information that can be passed
493 into `Glean.initialize` to avoid calling the package manager at runtime.
494
495 ## 2.1.0 (2021-02-10)
496
497 - Add support for generating Javascript code.
498 - The templates added generate metrics and pings code for Glean.js.
499
500 ## 2.0.0 (2021-02-05)
501
502 - New versions 2.0.0 of the `metrics.yaml` and `pings.yaml` schemas now ship
503 with `glean_parser`. These schemas are different from version 1.0.0 in the
504 following ways:
505
506 - Bugs must be specified as URLs. Bug numbers are disallowed.
507 - The legacy ping names containing underscores are no longer allowed. These
508 included `deletion_request`, `bookmarks_sync`, `history_sync`,
509 `session_end`, `all_pings`, `glean_*`). In these cases, the `_` should be
510 replaced with `-`.
511
512 To upgrade your app or library to use the new schema, replace the version in
513 the `$schema` value with `2-0-0`.
514
515 - **Breaking change:** It is now an error to use bug numbers (rather than URLs)
516 in ping definitions.
517
518 - Add the line number that metrics and pings were originally defined in the yaml
519 files.
520
521 ## 1.29.1 (2020-12-17)
522
523 - BUGFIX: Linter output can now be redirected correctly (1675771).
524
525 ## 1.29.0 (2020-10-07)
526
527 - **Breaking change:** `glean_parser` will now return an error code when any of
528 the input files do not exist (unless the `--allow-missing-files` flag is
529 passed).
530 - Generated code now includes a comment next to each metric containing the name
531 of the metric in its original `snake_case` form.
532 - When metrics don't provide a `unit` parameter, it is not included in the
533 output (as provided by probe-scraper).
534
535 ## 1.28.6 (2020-09-24)
536
537 - BUGFIX: Ensure Kotlin arguments are deterministically ordered
538
539 ## 1.28.5 (2020-09-14)
540
541 - Fix deploy step to update pip before deploying to pypi.
542
543 ## 1.28.4 (2020-09-14)
544
545 - The `SUPERFLUOUS_NO_LINT` warning has been removed from the glinter.
546 It likely did more harm than good, and makes it hard to make
547 `metrics.yaml` files that pass across different versions of
548 `glean_parser`.
549 - Expired metrics will now produce a linter warning, `EXPIRED_METRIC`.
550 - Expiry dates that are more than 730 days (\~2 years) in the future
551 will produce a linter warning, `EXPIRATION_DATE_TOO_FAR`.
552 - Allow using the Quantity metric type outside of Gecko.
553 - New parser configs `custom_is_expired` and `custom_validate_expires`
554 added. These are both functions that take the `expires` value of the
555 metric and return a bool. (See `Metric.is_expired` and
556 `Metric.validate_expires`). These will allow FOG to provide custom
557 validation for its version-based `expires` values.
558
559 ## 1.28.3 (2020-07-28)
560
561 - BUGFIX: Support HashSet and Dictionary in the C\## generated code.
562
563 ## 1.28.2 (2020-07-28)
564
565 - BUGFIX: Generate valid C\## code when using Labeled metric types.
566
567 ## 1.28.1 (2020-07-24)
568
569 - BUGFIX: Add missing column to correctly render markdown tables in generated
570 documentation.
571
572 ## 1.28.0 (2020-07-23)
573
574 - **Breaking change:** The internal ping `deletion-request` was misnamed in
575 pings.py causing the linter to not allow use of the correctly named ping for
576 adding legacy ids to. Consuming apps will need to update their metrics.yaml if
577 they are using `deletion_request` in any `send_in_pings` to `deletion-request`
578 after updating.
579
580 ## 1.27.0 (2020-07-21)
581
582 - Rename the `data_category` field to `data_sensitivity` to be clearer.
583
584 ## 1.26.0 (2020-07-21)
585
586 - Add support for JWE metric types.
587 - Add a `data_sensitivity` field to all metrics for specifying the type of data
588 collected in the field.
589
590 ## 1.25.0 (2020-07-17)
591
592 - Add support for generating C\## code.
593 - BUGFIX: The memory unit is now correctly passed to the MemoryDistribution
594 metric type in Swift.
595
596 ## 1.24.0 (2020-06-30)
597
598 - BUGFIX: look for metrics in send\_if\_empty pings. Metrics for these kinds of
599 pings were being ignored.
600
601 ## 1.23.0 (2020-06-27)
602
603 - Support for Python 3.5 has been dropped.
604 - BUGFIX: The ordering of event extra keys will now match with their enum,
605 fixing a serious bug where keys of extras may not match the correct values in
606 the data payload. See <https://bugzilla.mozilla.org/show_bug.cgi?id=1648768>.
607
608 ## 1.22.0 (2020-05-28)
609
610 - **Breaking change:** (Swift only) Combine all metrics and pings into a single
611 generated file `Metrics.swift`.
612
613 ## 1.21.0 (2020-05-25)
614
615 - `glinter` messages have been improved with more details and to be more
616 actionable.
617 - A maximum of 10 `extra_keys` is now enforced for `event` metric types.
618 - BUGFIX: the `Lifetime` enum values now match the values of the implementation
619 in mozilla/glean.
620
621 ## 1.20.4 (2020-05-07)
622
623 - BUGFIX: yamllint errors are now reported using the correct file name.
624
625 ## 1.20.3 (2020-05-06)
626
627 - Support for using `timing_distribution`'s `time_unit` parameter to control
628 the range of acceptable values is documented. The default unit for this use
629 case is `nanosecond` to avoid creating a breaking change. See [bug
630 1630997](https://bugzilla.mozilla.org/show_bug.cgi?id=1630997) for more
631 information.
632
633 ## 1.20.2 (2020-04-24)
634
635 - Dependencies that depend on the version of Python being used are now specified
636 using the [Declaring platform specific dependencies syntax in
637 setuptools](https://setuptools.readthedocs.io/en/latest/setuptools.html##declaring-platform-specific-dependencies).
638 This means that more recent versions of dependencies are likely to be
639 installed on Python 3.6 and later, and unnecessary backport libraries won't
640 be installed on more recent Python versions.
641
642 ## 1.20.1 (2020-04-21)
643
644 - The minimum version of the runtime dependencies has been lowered to increase
645 compatibility with other tools. These minimum versions are now tested in CI,
646 in addition to testing the latest versions of the dependencies that was
647 already happening in CI.
648
649 ## 1.20.0 (2020-04-15)
650
651 - **Breaking change:** glinter errors found during the `translate` command will
652 now return an error code. glinter warnings will be displayed, but not return
653 an error code.
654 - `glean_parser` now produces a linter warning when `user` lifetime metrics are
655 set to expire. See [bug
656 1604854](https://bugzilla.mozilla.org/show_bug.cgi?id=1604854) for additional
657 context.
658
659 ## 1.19.0 (2020-03-18)
660
661 - **Breaking change:** The regular expression used to validate labels is
662 stricter and more correct.
663 - Add more information about pings to markdown documentation:
664 - State whether the ping includes client id;
665 - Add list of data review links;
666 - Add list of related bugs links.
667 - `glean_parser` now makes it easier to write external translation
668 functions for different language targets.
669 - BUGFIX: `glean_parser` now works on 32-bit Windows.
670
671 ## 1.18.3 (2020-02-24)
672
673 - Dropped the `inflection` dependency.
674 - Constrained the `zipp` and `MarkupSafe` transitive dependencies to versions
675 that support Python 3.5.
676
677 ## 1.18.2 (2020-02-14)
678
679 - BUGFIX: Fix rendering of first element of reason list.
680
681 ## 1.18.1 (2020-02-14)
682
683 - BUGFIX: Reason codes are displayed in markdown output for built-in
684 pings as well.
685 - BUGFIX: Reason descriptions are indented correctly in markdown
686 output.
687 - BUGFIX: To avoid a compiler error, the `@JvmName` annotation isn't
688 added to private members.
689
690 ## 1.18.0 (2020-02-13)
691
692 - **Breaking Change (Java API)** Have the metrics names in Java match the names
693 in Kotlin. See [Bug
694 1588060](https://bugzilla.mozilla.org/show_bug.cgi?id=1588060).
695 - The reasons a ping are sent are now included in the generated markdown
696 documentation.
697
698 ## 1.17.3 (2020-02-05)
699
700 - BUGFIX: The version of Jinja2 now specifies < 3.0, since that version no
701 longer supports Python 3.5.
702
703 ## 1.17.2 (2020-02-05)
704
705 - BUGFIX: Fixes an import error in generated Kotlin code.
706
707 ## 1.17.1 (2020-02-05)
708
709 - BUGFIX: Generated Swift code now includes `import Glean`, unless generating
710 for a Glean-internal build.
711
712 ## 1.17.0 (2020-02-03)
713
714 - Remove default schema URL from `validate_ping`
715 - Make `schema` argument required for CLI
716 - BUGFIX: Avoid default import in Swift code for Glean itself
717 - BUGFIX: Restore order of fields in generated Swift code
718
719 ## 1.16.0 (2020-01-15)
720
721 - Support for `reason` codes on pings was added.
722
723 ## 1.15.6 (2020-02-06)
724
725 - BUGFIX: The version of Jinja2 now specifies < 3.0, since that version no
726 longer supports Python 3.5 (backported from 1.17.3).
727
728 ## 1.15.5 (2019-12-19)
729
730 - BUGFIX: Also allow the legacy name `all_pings` for `send_in_pings` parameter
731 on metrics
732
733 ## 1.15.4 (2019-12-19)
734
735 - BUGFIX: Also allow the legacy name `all_pings`
736
737 ## 1.15.3 (2019-12-13)
738
739 - Add project title to markdown template.
740 - Remove "Sorry about that" from markdown template.
741 - BUGFIX: Replace dashes in variable names to force proper naming
742
743 ## 1.15.2 (2019-12-12)
744
745 - BUGFIX: Use a pure Python library for iso8601 so there is no compilation
746 required.
747
748 ## 1.15.1 (2019-12-12)
749
750 - BUGFIX: Add some additional ping names to the non-kebab-case allow list.
751
752 ## 1.15.0 (2019-12-12)
753
754 - Restrict new pings names to be kebab-case and change `all_pings` to
755 `all-pings`
756
757 ## 1.14.0 (2019-12-06)
758
759 - `glean_parser` now supports Python versions 3.5, 3.6, 3.7 and 3.8.
760
761 ## 1.13.0 (2019-12-04)
762
763 - The `translate` command will no longer clear extra files in the output
764 directory.
765 - BUGFIX: Ensure all newlines in comments are prefixed with comment markers
766 - BUGFIX: Escape Swift keywords in variable names in generated code
767 - Generate documentation for pings that are sent if empty
768
769 ## 1.12.0 (2019-11-27)
770
771 - Reserve the `deletion_request` ping name
772 - Added a new flag `send_if_empty` for pings
773
774 ## 1.11.0 (2019-11-13)
775
776 - The `glinter` command now performs `yamllint` validation on registry files.
777
778 ## 1.10.0 (2019-11-11)
779
780 - The Kotlin linter `detekt` is now run during CI, and for local
781 testing if installed.
782 - Python 3.8 is now tested in CI (in addition to Python 3.7). Using
783 `tox` for this doesn't work in modern versions of CircleCI, so the
784 `tox` configuration has been removed.
785 - `yamllint` has been added to test the YAML files on CI.
786 - ⚠ Metric types that don't yet have implementations in glean-core
787 have been removed. This includes `enumeration`, `rate`, `usage`, and
788 `use_counter`, as well as many labeled metrics that don't exist.
789
790 ## 1.9.5 (2019-10-22)
791
792 - Allow a Swift lint for generated code
793 - New lint: Restrict what metric can go into the `baseline` ping
794 - New lint: Warn for slight misspellings in ping names
795 - BUGFIX: change Labeled types labels from lists to sets.
796
797 ## 1.9.4 (2019-10-16)
798
799 - Use lists instead of sets in Labeled types labels to ensure that the order of
800 the labels passed to the `metrics.yaml` is kept.
801 - `glinter` will now check for duplicate labels and error if there are any.
802
803 ## 1.9.3 (2019-10-09)
804
805 - Add labels from Labeled types to the Extra column in the Markdown template.
806
807 ## 1.9.2 (2019-10-08)
808
809 - BUGFIX: Don't call `is_internal_metric` on `Ping` objects.
810
811 ## 1.9.1 (2019-10-07)
812
813 - Don't include Glean internal metrics in the generated markdown.
814
815 ## 1.9.0 (2019-10-04)
816
817 - Glinter now warns when bug numbers (rather than URLs) are used.
818 - BUGFIX: add `HistogramType` and `MemoryUnit` imports in Kotlin generated code.
819
820 ## 1.8.4 (2019-10-02)
821
822 - Removed unsupported labeled metric types.
823
824 ## 1.8.3 (2019-10-02)
825
826 - Fix indentation for generated Swift code
827
828 ## 1.8.2 (2019-10-01)
829
830 - Created labeled metrics and events in Swift code and wrap it in a
831 configured namespace
832
833 ## 1.8.1 (2019-09-27)
834
835 - BUGFIX: `memory_unit` is now passed to the Kotlin generator.
836
837 ## 1.8.0 (2019-09-26)
838
839 - A new parser config, `do_not_disable_expired`, was added to turn off the
840 feature that expired metrics are automatically disabled. This is useful if you
841 want to retain the disabled value that is explicitly in the `metrics.yaml`
842 file.
843 - `glinter` will now report about superfluous `no_lint` entries.
844
845 ## 1.7.0 (2019-09-24)
846
847 - A `glinter` tool is now included to find common mistakes in metric naming
848 and setup. This check is run during `translate` and warnings will be
849 displayed. ⚠ These warnings will be treated as errors in a future revision.
850
851 ## 1.6.1 (2019-09-17)
852
853 - BUGFIX: `GleanGeckoMetricsMapping` must include `LabeledMetricType`
854 and `CounterMetricType`.
855
856 ## 1.6.0 (2019-09-17)
857
858 - NEW: Support for outputting metrics in Swift.
859 - BUGFIX: Provides a helpful error message when `geckoview_datapoint` is used on
860 an metric type that doesn't support GeckoView exfiltration.
861 - Generate a lookup table for Gecko categorical histograms in
862 `GleanGeckoMetricsMapping`.
863 - Introduce a 'Swift' output generator.
864
865 ## 1.4.1 (2019-08-28)
866
867 - Documentation only.
868
869 ## 1.4.0 (2019-08-27)
870
871 - Added support for generating markdown documentation from `metrics.yaml` files.
872
873 ## 1.3.0 (2019-08-22)
874
875 - `quantity` metric type has been added.
876
877 ## 1.2.1 (2019-08-13)
878
879 - BUGFIX: `includeClientId` was not being output for PingType.
880
881 ## 1.2.0 (2019-08-13)
882
883 - `memory_distribution` metric type has been added.
884 - `custom_distribution` metric type has been added.
885 - `labeled_timespan` is no longer an allowed metric type.
886
887 ## 1.1.0 (2019-08-05)
888
889 - Add a special `all_pings` value to `send_in_pings`.
890
891 ## 1.0.0 (2019-07-29)
892
893 - First release to start following strict semver.
894
895 ## 0.1.0 (2018-10-15)
896
897 - First release on PyPI.