glean-parser 14.2.0__tar.gz → 14.4.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (153) hide show
  1. glean_parser-14.4.0/.github/CODEOWNERS +12 -0
  2. {glean_parser-14.2.0 → glean_parser-14.4.0}/CHANGELOG.md +11 -0
  3. {glean_parser-14.2.0 → glean_parser-14.4.0}/PKG-INFO +12 -1
  4. {glean_parser-14.2.0 → glean_parser-14.4.0}/docs/history.md +11 -0
  5. {glean_parser-14.2.0 → glean_parser-14.4.0}/glean_parser/javascript_server.py +18 -2
  6. {glean_parser-14.2.0 → glean_parser-14.4.0}/glean_parser/schemas/metrics.2-0-0.schema.yaml +6 -1
  7. {glean_parser-14.2.0 → glean_parser-14.4.0}/glean_parser/templates/javascript_server.jinja2 +10 -1
  8. {glean_parser-14.2.0 → glean_parser-14.4.0}/glean_parser/templates/kotlin.jinja2 +26 -6
  9. {glean_parser-14.2.0 → glean_parser-14.4.0}/glean_parser/templates/ruby_server.jinja2 +1 -1
  10. {glean_parser-14.2.0 → glean_parser-14.4.0}/glean_parser/templates/rust.jinja2 +47 -15
  11. {glean_parser-14.2.0 → glean_parser-14.4.0}/glean_parser/templates/swift.jinja2 +4 -4
  12. {glean_parser-14.2.0 → glean_parser-14.4.0}/glean_parser.egg-info/PKG-INFO +12 -1
  13. {glean_parser-14.2.0 → glean_parser-14.4.0}/glean_parser.egg-info/SOURCES.txt +1 -0
  14. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/data/all_metrics.yaml +3 -0
  15. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/data/event_key_ordering.yaml +3 -0
  16. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/data/server_events_compare.rb +4 -2
  17. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/data/server_metrics_with_event.yaml +5 -0
  18. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/test-py/test.py +1 -0
  19. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/test_javascript.py +2 -2
  20. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/test_javascript_server.py +1 -0
  21. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/test_kotlin.py +5 -4
  22. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/test_markdown.py +2 -1
  23. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/test_ruby_server.py +1 -0
  24. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/test_rust.py +4 -4
  25. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/test_swift.py +4 -4
  26. {glean_parser-14.2.0 → glean_parser-14.4.0}/.circleci/config.yml +0 -0
  27. {glean_parser-14.2.0 → glean_parser-14.4.0}/.editorconfig +0 -0
  28. {glean_parser-14.2.0 → glean_parser-14.4.0}/.github/ISSUE_TEMPLATE.md +0 -0
  29. {glean_parser-14.2.0 → glean_parser-14.4.0}/.github/dependabot.yml +0 -0
  30. {glean_parser-14.2.0 → glean_parser-14.4.0}/.github/pull_request_template.md +0 -0
  31. {glean_parser-14.2.0 → glean_parser-14.4.0}/.gitignore +0 -0
  32. {glean_parser-14.2.0 → glean_parser-14.4.0}/.swiftlint.yml +0 -0
  33. {glean_parser-14.2.0 → glean_parser-14.4.0}/AUTHORS.md +0 -0
  34. {glean_parser-14.2.0 → glean_parser-14.4.0}/CODE_OF_CONDUCT.md +0 -0
  35. {glean_parser-14.2.0 → glean_parser-14.4.0}/CONTRIBUTING.md +0 -0
  36. {glean_parser-14.2.0 → glean_parser-14.4.0}/LICENSE +0 -0
  37. {glean_parser-14.2.0 → glean_parser-14.4.0}/MANIFEST.in +0 -0
  38. {glean_parser-14.2.0 → glean_parser-14.4.0}/Makefile +0 -0
  39. {glean_parser-14.2.0 → glean_parser-14.4.0}/README.md +0 -0
  40. {glean_parser-14.2.0 → glean_parser-14.4.0}/docs/Makefile +0 -0
  41. {glean_parser-14.2.0 → glean_parser-14.4.0}/docs/_static/glean.jpeg +0 -0
  42. {glean_parser-14.2.0 → glean_parser-14.4.0}/docs/authors.md +0 -0
  43. {glean_parser-14.2.0 → glean_parser-14.4.0}/docs/conf.py +0 -0
  44. {glean_parser-14.2.0 → glean_parser-14.4.0}/docs/contributing.md +0 -0
  45. {glean_parser-14.2.0 → glean_parser-14.4.0}/docs/index.rst +0 -0
  46. {glean_parser-14.2.0 → glean_parser-14.4.0}/docs/installation.md +0 -0
  47. {glean_parser-14.2.0 → glean_parser-14.4.0}/docs/make.bat +0 -0
  48. {glean_parser-14.2.0 → glean_parser-14.4.0}/docs/metrics-yaml.rst +0 -0
  49. {glean_parser-14.2.0 → glean_parser-14.4.0}/docs/pings-yaml.rst +0 -0
  50. {glean_parser-14.2.0 → glean_parser-14.4.0}/docs/readme.md +0 -0
  51. {glean_parser-14.2.0 → glean_parser-14.4.0}/docs/tags-yaml.rst +0 -0
  52. {glean_parser-14.2.0 → glean_parser-14.4.0}/glean_parser/__init__.py +0 -0
  53. {glean_parser-14.2.0 → glean_parser-14.4.0}/glean_parser/__main__.py +0 -0
  54. {glean_parser-14.2.0 → glean_parser-14.4.0}/glean_parser/coverage.py +0 -0
  55. {glean_parser-14.2.0 → glean_parser-14.4.0}/glean_parser/data_review.py +0 -0
  56. {glean_parser-14.2.0 → glean_parser-14.4.0}/glean_parser/go_server.py +0 -0
  57. {glean_parser-14.2.0 → glean_parser-14.4.0}/glean_parser/javascript.py +0 -0
  58. {glean_parser-14.2.0 → glean_parser-14.4.0}/glean_parser/kotlin.py +0 -0
  59. {glean_parser-14.2.0 → glean_parser-14.4.0}/glean_parser/lint.py +0 -0
  60. {glean_parser-14.2.0 → glean_parser-14.4.0}/glean_parser/markdown.py +0 -0
  61. {glean_parser-14.2.0 → glean_parser-14.4.0}/glean_parser/metrics.py +0 -0
  62. {glean_parser-14.2.0 → glean_parser-14.4.0}/glean_parser/parser.py +0 -0
  63. {glean_parser-14.2.0 → glean_parser-14.4.0}/glean_parser/pings.py +0 -0
  64. {glean_parser-14.2.0 → glean_parser-14.4.0}/glean_parser/python_server.py +0 -0
  65. {glean_parser-14.2.0 → glean_parser-14.4.0}/glean_parser/ruby_server.py +0 -0
  66. {glean_parser-14.2.0 → glean_parser-14.4.0}/glean_parser/rust.py +0 -0
  67. {glean_parser-14.2.0 → glean_parser-14.4.0}/glean_parser/schemas/metrics.1-0-0.schema.yaml +0 -0
  68. {glean_parser-14.2.0 → glean_parser-14.4.0}/glean_parser/schemas/pings.1-0-0.schema.yaml +0 -0
  69. {glean_parser-14.2.0 → glean_parser-14.4.0}/glean_parser/schemas/pings.2-0-0.schema.yaml +0 -0
  70. {glean_parser-14.2.0 → glean_parser-14.4.0}/glean_parser/schemas/tags.1-0-0.schema.yaml +0 -0
  71. {glean_parser-14.2.0 → glean_parser-14.4.0}/glean_parser/swift.py +0 -0
  72. {glean_parser-14.2.0 → glean_parser-14.4.0}/glean_parser/tags.py +0 -0
  73. {glean_parser-14.2.0 → glean_parser-14.4.0}/glean_parser/templates/data_review.jinja2 +0 -0
  74. {glean_parser-14.2.0 → glean_parser-14.4.0}/glean_parser/templates/go_server.jinja2 +0 -0
  75. {glean_parser-14.2.0 → glean_parser-14.4.0}/glean_parser/templates/javascript.buildinfo.jinja2 +0 -0
  76. {glean_parser-14.2.0 → glean_parser-14.4.0}/glean_parser/templates/javascript.jinja2 +0 -0
  77. {glean_parser-14.2.0 → glean_parser-14.4.0}/glean_parser/templates/kotlin.buildinfo.jinja2 +0 -0
  78. {glean_parser-14.2.0 → glean_parser-14.4.0}/glean_parser/templates/kotlin.geckoview.jinja2 +0 -0
  79. {glean_parser-14.2.0 → glean_parser-14.4.0}/glean_parser/templates/markdown.jinja2 +0 -0
  80. {glean_parser-14.2.0 → glean_parser-14.4.0}/glean_parser/templates/python_server.jinja2 +0 -0
  81. {glean_parser-14.2.0 → glean_parser-14.4.0}/glean_parser/templates/qmldir.jinja2 +0 -0
  82. {glean_parser-14.2.0 → glean_parser-14.4.0}/glean_parser/translate.py +0 -0
  83. {glean_parser-14.2.0 → glean_parser-14.4.0}/glean_parser/translation_options.py +0 -0
  84. {glean_parser-14.2.0 → glean_parser-14.4.0}/glean_parser/util.py +0 -0
  85. {glean_parser-14.2.0 → glean_parser-14.4.0}/glean_parser/validate_ping.py +0 -0
  86. {glean_parser-14.2.0 → glean_parser-14.4.0}/glean_parser.egg-info/dependency_links.txt +0 -0
  87. {glean_parser-14.2.0 → glean_parser-14.4.0}/glean_parser.egg-info/entry_points.txt +0 -0
  88. {glean_parser-14.2.0 → glean_parser-14.4.0}/glean_parser.egg-info/not-zip-safe +0 -0
  89. {glean_parser-14.2.0 → glean_parser-14.4.0}/glean_parser.egg-info/requires.txt +0 -0
  90. {glean_parser-14.2.0 → glean_parser-14.4.0}/glean_parser.egg-info/top_level.txt +0 -0
  91. {glean_parser-14.2.0 → glean_parser-14.4.0}/pytest.ini +0 -0
  92. {glean_parser-14.2.0 → glean_parser-14.4.0}/requirements_dev.txt +0 -0
  93. {glean_parser-14.2.0 → glean_parser-14.4.0}/server_telemetry/sdk-metrics-compat.yaml +0 -0
  94. {glean_parser-14.2.0 → glean_parser-14.4.0}/server_telemetry/server-side-pings.yaml +0 -0
  95. {glean_parser-14.2.0 → glean_parser-14.4.0}/setup.cfg +0 -0
  96. {glean_parser-14.2.0 → glean_parser-14.4.0}/setup.py +0 -0
  97. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/conftest.py +0 -0
  98. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/data/all_pings.yaml +0 -0
  99. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/data/bad_ping.yamlx +0 -0
  100. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/data/core.yaml +0 -0
  101. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/data/duplicate_labeled.yaml +0 -0
  102. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/data/duplicate_send_in_ping.yaml +0 -0
  103. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/data/empty.yaml +0 -0
  104. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/data/events_with_types.yaml +0 -0
  105. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/data/fxa-server-metrics.yaml +0 -0
  106. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/data/fxa-server-pings.yaml +0 -0
  107. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/data/gecko.yaml +0 -0
  108. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/data/go_server_metrics.yaml +0 -0
  109. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/data/go_server_metrics_unsupported.yaml +0 -0
  110. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/data/invalid-ping-names.yaml +0 -0
  111. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/data/invalid.yamlx +0 -0
  112. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/data/jwe.yaml +0 -0
  113. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/data/metric-with-tags.yaml +0 -0
  114. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/data/mixed-expirations.yaml +0 -0
  115. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/data/object.yaml +0 -0
  116. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/data/old_event_api.yamlx +0 -0
  117. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/data/ordering.yaml +0 -0
  118. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/data/pings.yaml +0 -0
  119. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/data/rate.yaml +0 -0
  120. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/data/ruby_server_metrics_unsupported.yaml +0 -0
  121. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/data/ruby_server_pings_unsupported.yaml +0 -0
  122. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/data/schema-violation.yaml +0 -0
  123. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/data/send_if_empty_with_metrics.yaml +0 -0
  124. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/data/server_events_compare.go +0 -0
  125. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/data/server_metrics_no_events_no_pings.yaml +0 -0
  126. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/data/server_pings.yaml +0 -0
  127. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/data/single_labeled.yaml +0 -0
  128. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/data/smaller.yaml +0 -0
  129. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/data/tags.yaml +0 -0
  130. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/data/telemetry_mirror.yaml +0 -0
  131. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/data/text.yaml +0 -0
  132. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/data/text_invalid.yaml +0 -0
  133. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/data/unknown_ping_used.yaml +0 -0
  134. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/data/wrong_key.yamlx +0 -0
  135. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/data/yaml_nits.yamlx +0 -0
  136. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/detekt.yml +0 -0
  137. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/test-go/test.go.tmpl +0 -0
  138. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/test-js/package.json +0 -0
  139. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/test-js/test.js.tmpl +0 -0
  140. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/test-rb/test.rb.tmpl +0 -0
  141. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/test_cli.py +0 -0
  142. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/test_go_server.py +0 -0
  143. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/test_lint.py +0 -0
  144. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/test_metrics.py +0 -0
  145. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/test_parser.py +0 -0
  146. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/test_pings.py +0 -0
  147. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/test_python_server.py +0 -0
  148. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/test_tags.py +0 -0
  149. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/test_translate.py +0 -0
  150. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/test_utils.py +0 -0
  151. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/test_validate_ping.py +0 -0
  152. {glean_parser-14.2.0 → glean_parser-14.4.0}/tests/util.py +0 -0
  153. {glean_parser-14.2.0 → glean_parser-14.4.0}/tools/extract_data_categories.py +0 -0
@@ -0,0 +1,12 @@
1
+ # This Source Code Form is subject to the terms of the Mozilla Public
2
+ # License, v. 2.0. If a copy of the MPL was not distributed with this
3
+ # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4
+
5
+ # This CODEOWNERS file defines individuals or teams that are responsible
6
+ # for code in this repository.
7
+ # See https://help.github.com/articles/about-codeowners/ for details.
8
+
9
+ * @mozilla/glean
10
+ glean_parser/*_server.py @akkomar
11
+ tests/*_server.py @akkomar
12
+ server_telemetry/* @akkomar
@@ -2,6 +2,17 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 14.4.0
6
+
7
+ - Fix JS and Ruby server templates to correctly send event extra values as strings ([DENG-4405](https://mozilla-hub.atlassian.net/browse/DENG-4405))
8
+ - 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))
9
+
10
+ ## 14.3.0
11
+
12
+ - Add the `module_spec` option to the javascript_server outputter ([#726](https://github.com/mozilla/glean_parser/pull/726))
13
+ - BUGFIX: Fix the Rust codegen for changes to how `labeled_*` metrics are constructed ([bug 1909244](https://bugzilla.mozilla.org/show_bug.cgi?id=1909244))
14
+ - Generate a serializer for array wrappers ([bug 1908157](https://bugzilla.mozilla.org/show_bug.cgi?id=1908157))
15
+
5
16
  ## 14.2.0
6
17
 
7
18
  - New Metric Types: `labeled_{custom|memory|timing}_distribution` ([bug 1657947](https://bugzilla.mozilla.org/show_bug.cgi?id=1657947))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: glean_parser
3
- Version: 14.2.0
3
+ Version: 14.4.0
4
4
  Summary: Parser tools for Mozilla's Glean telemetry
5
5
  Home-page: https://github.com/mozilla/glean_parser
6
6
  Author: The Glean Team
@@ -79,6 +79,17 @@ $ glean_parser check < ping.json
79
79
 
80
80
  ## Unreleased
81
81
 
82
+ ## 14.4.0
83
+
84
+ - Fix JS and Ruby server templates to correctly send event extra values as strings ([DENG-4405](https://mozilla-hub.atlassian.net/browse/DENG-4405))
85
+ - 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))
86
+
87
+ ## 14.3.0
88
+
89
+ - Add the `module_spec` option to the javascript_server outputter ([#726](https://github.com/mozilla/glean_parser/pull/726))
90
+ - BUGFIX: Fix the Rust codegen for changes to how `labeled_*` metrics are constructed ([bug 1909244](https://bugzilla.mozilla.org/show_bug.cgi?id=1909244))
91
+ - Generate a serializer for array wrappers ([bug 1908157](https://bugzilla.mozilla.org/show_bug.cgi?id=1908157))
92
+
82
93
  ## 14.2.0
83
94
 
84
95
  - New Metric Types: `labeled_{custom|memory|timing}_distribution` ([bug 1657947](https://bugzilla.mozilla.org/show_bug.cgi?id=1657947))
@@ -2,6 +2,17 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 14.4.0
6
+
7
+ - Fix JS and Ruby server templates to correctly send event extra values as strings ([DENG-4405](https://mozilla-hub.atlassian.net/browse/DENG-4405))
8
+ - 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))
9
+
10
+ ## 14.3.0
11
+
12
+ - Add the `module_spec` option to the javascript_server outputter ([#726](https://github.com/mozilla/glean_parser/pull/726))
13
+ - BUGFIX: Fix the Rust codegen for changes to how `labeled_*` metrics are constructed ([bug 1909244](https://bugzilla.mozilla.org/show_bug.cgi?id=1909244))
14
+ - Generate a serializer for array wrappers ([bug 1908157](https://bugzilla.mozilla.org/show_bug.cgi?id=1908157))
15
+
5
16
  ## 14.2.0
6
17
 
7
18
  - New Metric Types: `labeled_{custom|memory|timing}_distribution` ([bug 1657947](https://bugzilla.mozilla.org/show_bug.cgi?id=1657947))
@@ -87,6 +87,7 @@ def output(
87
87
  lang: str,
88
88
  objs: metrics.ObjectTree,
89
89
  output_dir: Path,
90
+ options: Optional[Dict[str, Any]] = None,
90
91
  ) -> None:
91
92
  """
92
93
  Given a tree of objects, output Javascript or Typescript code to `output_dir`.
@@ -100,6 +101,16 @@ def output(
100
101
  :param output_dir: Path to an output directory to write to.
101
102
  """
102
103
 
104
+ if options is None:
105
+ options = {}
106
+
107
+ module_spec = options.get("module_spec", "es")
108
+ accepted_module_specs = ["es", "commonjs"]
109
+ if module_spec not in accepted_module_specs:
110
+ raise ValueError(
111
+ f"Unknown module_spec: {module_spec}. Accepted specs are: {accepted_module_specs}." # noqa
112
+ )
113
+
103
114
  template = util.get_jinja2_template(
104
115
  "javascript_server.jinja2",
105
116
  filters=(
@@ -184,6 +195,7 @@ def output(
184
195
  parser_version=__version__,
185
196
  pings=ping_to_metrics,
186
197
  event_metric_exists=event_metric_exists,
198
+ module_spec=module_spec,
187
199
  lang=lang,
188
200
  )
189
201
  )
@@ -198,9 +210,13 @@ def output_javascript(
198
210
  :param objects: A tree of objects (metrics and pings) as returned from
199
211
  `parser.parse_objects`.
200
212
  :param output_dir: Path to an output directory to write to.
213
+ :param options: options dictionary, with the following optional keys:
214
+
215
+ - `module_spec`: Module specification to use. Options are `es`, `commonjs`.
216
+ Default is `es`.
201
217
  """
202
218
 
203
- output("javascript", objs, output_dir)
219
+ output("javascript", objs, output_dir, options)
204
220
 
205
221
 
206
222
  def output_typescript(
@@ -214,4 +230,4 @@ def output_typescript(
214
230
  :param output_dir: Path to an output directory to write to.
215
231
  """
216
232
 
217
- output("typescript", objs, output_dir)
233
+ output("typescript", objs, output_dir, options)
@@ -28,6 +28,11 @@ definitions:
28
28
  pattern: "^[a-z_][a-z0-9_]{0,29}(\\.[a-z_][a-z0-9_]{0,29})*$"
29
29
  maxLength: 40
30
30
 
31
+ event_extra_key:
32
+ type: string
33
+ pattern: "^[ -~]+$"
34
+ maxLength: 40
35
+
31
36
  # Prior to version 2.0.0 of the schema, special ping names with underscores
32
37
  # were also supported.
33
38
  kebab_case:
@@ -385,7 +390,7 @@ definitions:
385
390
  Valid when `type`_ is `event`.
386
391
  type: object
387
392
  propertyNames:
388
- $ref: "#/definitions/dotted_snake_case"
393
+ $ref: "#/definitions/event_extra_key"
389
394
  additionalProperties:
390
395
  type: object
391
396
  properties:
@@ -11,8 +11,13 @@ Jinja2 template is not. Please file bugs! #}
11
11
  // @types/uuid and mozlog types definitions are required in devDependencies
12
12
  // for the latter see https://github.com/mozilla/fxa/blob/85bda71cda376c417b8c850ba82aa14252208c3c/types/mozlog/index.d.ts
13
13
  {% endif %}
14
+ {% if module_spec == "commonjs" %}
15
+ const uuidv4 = require('uuid').v4;
16
+ const mozlog = require('mozlog');
17
+ {% else %}
14
18
  import { v4 as uuidv4 } from 'uuid';
15
19
  import mozlog{% if lang == "typescript" %}, { Logger }{% endif %} from 'mozlog';
20
+ {% endif %}
16
21
 
17
22
  const GLEAN_EVENT_MOZLOG_TYPE = 'glean-server-event';
18
23
  {% if lang == "typescript" %}
@@ -229,7 +234,7 @@ class {{ ping|event_class_name(metrics_by_type) }} {
229
234
  {% if event.extra_keys %}
230
235
  extra: {
231
236
  {% for extra, metadata in event.extra_keys.items() %}
232
- {{ extra }}: {{ extra }},
237
+ {{ extra }}: String({{ extra }}),
233
238
  {% endfor %}
234
239
  },
235
240
  {% endif %}
@@ -262,7 +267,11 @@ class {{ ping|event_class_name(metrics_by_type) }} {
262
267
  * @param {Object} logger_options - The logger options.
263
268
  * @returns {EventsServerEventLogger} An instance of EventsServerEventLogger.
264
269
  */
270
+ {% if module_spec == "commonjs" %}
271
+ module.exports.{{ ping|factory_method(metrics_by_type) }} = function ({
272
+ {% else %}
265
273
  export const {{ ping|factory_method(metrics_by_type) }} = function ({
274
+ {% endif %}
266
275
  applicationId,
267
276
  appDisplayVersion,
268
277
  channel,
@@ -68,7 +68,7 @@ data class {{ obj.name|Camelize }}{{ suffix }}(
68
68
 
69
69
  {%- macro generate_structure(name, struct) %}
70
70
  {%- if struct.type == "array" -%}
71
- @Serializable
71
+ @Serializable(with = {{name}}.Serializer::class)
72
72
  data class {{ name }}(var items: MutableList<{{ name }}Item> = mutableListOf()) : ObjectSerialize {
73
73
  fun add(elem: {{ name }}Item) = items.add(elem)
74
74
 
@@ -85,6 +85,20 @@ data class {{ obj.name|Camelize }}{{ suffix }}(
85
85
  override fun intoSerializedObject(): String {
86
86
  return Json.encodeToString(items)
87
87
  }
88
+
89
+ internal object Serializer : KSerializer<{{name}}> {
90
+ @OptIn(kotlinx.serialization.ExperimentalSerializationApi::class)
91
+ override val descriptor = listSerialDescriptor<String>()
92
+
93
+ override fun deserialize(decoder: Decoder): {{ name }} {
94
+ val list = decoder.decodeSerializableValue(ListSerializer(serializer<{{name}}Item>()))
95
+ return {{name}}(items = list.toMutableList())
96
+ }
97
+
98
+ override fun serialize(encoder: Encoder, value: {{name}}) {
99
+ encoder.encodeSerializableValue(ListSerializer(serializer<{{name}}Item>()), value.items)
100
+ }
101
+ }
88
102
  }
89
103
 
90
104
  {{ generate_structure(name ~ "Item", struct["items"]) }}
@@ -93,10 +107,10 @@ data class {{ obj.name|Camelize }}{{ suffix }}(
93
107
  @Serializable
94
108
  data class {{ name }}(
95
109
  {% for itemname, val in struct.properties.items() %}
96
- {% if val.type == "object" %}
110
+ {% if val.type == "array" %}
111
+ var {{itemname|camelize}}: {{ name ~ itemname|Camelize }} = {{ name ~ itemname|Camelize }}(),
112
+ {% elif val.type == "object" %}
97
113
  var {{itemname|camelize}}: {{ name ~ "Item" ~ itemname|Camelize ~ "Object" }}? = null,
98
- {% elif val.type == "array" %}
99
- var {{itemname|camelize}}: {{ name ~ "Item" ~ itemname|Camelize }} = {{ name ~ "Item" ~ itemname|Camelize }}(),
100
114
  {% else %}
101
115
  var {{itemname|camelize}}: {{val.type|structure_type_name}}? = null,
102
116
  {% endif %}
@@ -109,7 +123,7 @@ data class {{ obj.name|Camelize }}{{ suffix }}(
109
123
 
110
124
  {% for itemname, val in struct.properties.items() %}
111
125
  {% if val.type == "array" %}
112
- {% set nested_name = name ~ "Item" ~ itemname|Camelize %}
126
+ {% set nested_name = name ~ itemname|Camelize %}
113
127
  {{ generate_structure(nested_name, val) }}
114
128
  {% elif val.type == "object" %}
115
129
  {% set nested_name = name ~ "Item" ~ itemname|Camelize ~ "Object" %}
@@ -127,7 +141,7 @@ data class {{ obj.name|Camelize }}{{ suffix }}(
127
141
  {%- elif struct.type == "object" -%}
128
142
  {% for itemname, val in struct.properties.items() %}
129
143
  {% if val.type == "array" %}
130
- {% set nested_name = name ~ "Item" ~ itemname|Camelize %}
144
+ {% set nested_name = name ~ itemname|Camelize %}
131
145
  {{ generate_structure_typealias(nested_name, val) }}
132
146
  {% elif val.type == "object" %}
133
147
  {% set nested_name = name ~ "Item" ~ itemname|Camelize ~ "Object" %}
@@ -160,9 +174,15 @@ import {{ glean_namespace }}.private.{{ obj_type }} // ktlint-disable import-ord
160
174
  import {{ glean_namespace }}.private.LabeledMetricType // ktlint-disable import-ordering
161
175
  {% endif %}
162
176
  {% if has_object_metrics %}
177
+ import kotlinx.serialization.KSerializer
163
178
  import kotlinx.serialization.Serializable
179
+ import kotlinx.serialization.builtins.ListSerializer
180
+ import kotlinx.serialization.descriptors.listSerialDescriptor
164
181
  import kotlinx.serialization.encodeToString
182
+ import kotlinx.serialization.encoding.Decoder
183
+ import kotlinx.serialization.encoding.Encoder
165
184
  import kotlinx.serialization.json.Json
185
+ import kotlinx.serialization.serializer
166
186
  {% endif %}
167
187
 
168
188
  {# HACK HACK HACK -- typealiases MUST BE top-level #}
@@ -155,7 +155,7 @@ module Glean
155
155
  'timestamp' => (Time.now.utc.to_f * 1000).to_i,
156
156
  'extra' => [
157
157
  {% for extra, metadata in event.extra_keys.items() %}
158
- ['{{ extra }}', {{ extra }}],
158
+ ['{{ extra }}', {{ extra }}.to_s],
159
159
  {% endfor %}
160
160
  ].to_h,
161
161
  },
@@ -20,12 +20,12 @@ Jinja2 template is not. Please file bugs! #}
20
20
  #[serde(deny_unknown_fields)]
21
21
  pub struct {{ name }} {
22
22
  {% for itemname, val in struct.properties.items() %}
23
- {% if val.type == "object" %}
23
+ {% if val.type == "array" %}
24
+ #[serde(skip_serializing_if = "Vec::is_empty", default = "Vec::new")]
25
+ pub {{itemname|snake_case}}: {{ name ~ itemname|Camelize }},
26
+ {% elif val.type == "object" %}
24
27
  #[serde(skip_serializing_if = "Option::is_none")]
25
28
  pub {{itemname|snake_case}}: Option<{{ name ~ "Item" ~ itemname|Camelize ~ "Object" }}>,
26
- {% elif val.type == "array" %}
27
- #[serde(skip_serializing_if = "Vec::is_empty", default = "Vec::new")]
28
- pub {{itemname|snake_case}}: {{ name ~ "Item" ~ itemname|Camelize }},
29
29
  {% else %}
30
30
  #[serde(skip_serializing_if = "Option::is_none")]
31
31
  pub {{itemname|snake_case}}: Option<{{val.type|structure_type_name}}>,
@@ -35,7 +35,7 @@ Jinja2 template is not. Please file bugs! #}
35
35
 
36
36
  {% for itemname, val in struct.properties.items() %}
37
37
  {% if val.type == "array" %}
38
- {% set nested_name = name ~ "Item" ~ itemname|Camelize %}
38
+ {% set nested_name = name ~ itemname|Camelize %}
39
39
  {{ generate_structure(nested_name, val) }}
40
40
  {% elif val.type == "object" %}
41
41
  {% set nested_name = name ~ "Item" ~ itemname|Camelize ~ "Object" %}
@@ -80,6 +80,16 @@ impl ExtraKeys for {{ obj.name|Camelize }}{{ suffix }} {
80
80
  }
81
81
  }
82
82
  {% endmacro %}
83
+ {% macro common_metric_data(obj) %}
84
+ CommonMetricData {
85
+ category: {{ obj.category|rust }},
86
+ name: {{ obj.name|rust }},
87
+ send_in_pings: {{ obj.send_in_pings|rust }},
88
+ lifetime: {{ obj.lifetime|rust }},
89
+ disabled: {{ obj.is_disabled()|rust }},
90
+ ..Default::default()
91
+ }
92
+ {% endmacro %}
83
93
  {% for category in categories %}
84
94
  {% if category.contains_pings %}
85
95
  {% for obj in category.objs.values() %}
@@ -92,7 +102,7 @@ pub static {{ obj.name|snake_case }}: ::glean::private::__export::Lazy<::glean::
92
102
  {% else %}
93
103
  pub mod {{ category.name|snake_case }} {
94
104
  #[allow(unused_imports)] // HistogramType might be unusued, let's avoid warnings
95
- use glean::{private::*, traits::ExtraKeys, traits::NoExtraKeys, CommonMetricData, HistogramType, Lifetime, TimeUnit, MemoryUnit};
105
+ use glean::{private::*, traits::ExtraKeys, traits::NoExtraKeys, CommonMetricData, HistogramType, LabeledMetricData, Lifetime, TimeUnit, MemoryUnit};
96
106
  {% for obj in category.objs.values() %}
97
107
 
98
108
  {% if obj|attr("_generate_structure") %}
@@ -107,15 +117,37 @@ pub mod {{ category.name|snake_case }} {
107
117
  ///
108
118
  /// {{ obj.description|wordwrap() | replace('\n', '\n /// ') }}
109
119
  pub static {{ obj.name|snake_case }}: ::glean::private::__export::Lazy<{{ obj|type_name }}> = ::glean::private::__export::Lazy::new(|| {
110
- {{ obj|ctor }}(CommonMetricData {
111
- category: {{ obj.category|rust }},
112
- name: {{ obj.name|rust }},
113
- send_in_pings: {{ obj.send_in_pings|rust }},
114
- lifetime: {{ obj.lifetime|rust }},
115
- disabled: {{ obj.is_disabled()|rust }},
116
- ..Default::default()
117
- }
118
- {%- for arg_name in extra_metric_args if obj[arg_name] is defined and arg_name != 'allowed_extra_keys' -%}
120
+ let meta =
121
+ {% if obj.type == "labeled_custom_distribution" %}
122
+ LabeledMetricData::CustomDistribution {
123
+ cmd: {{ common_metric_data(obj)|indent(16) }}
124
+ {%- for arg_name in extra_metric_args if obj[arg_name] is defined and arg_name != 'allowed_extra_keys' -%}
125
+ , {{ arg_name }}: {{ obj[arg_name]|rust }}
126
+ {%- endfor -%}
127
+ };
128
+ {% elif obj.type == "labeled_memory_distribution" %}
129
+ LabeledMetricData::MemoryDistribution {
130
+ cmd: {{ common_metric_data(obj)|indent(16) }}
131
+ {%- for arg_name in extra_metric_args if obj[arg_name] is defined and arg_name != 'allowed_extra_keys' -%}
132
+ , {{ "unit" if arg_name == "memory_unit" else arg_name }}: {{ obj[arg_name]|rust }}
133
+ {%- endfor -%}
134
+ };
135
+ {% elif obj.type == "labeled_timing_distribution" %}
136
+ LabeledMetricData::TimingDistribution {
137
+ cmd: {{ common_metric_data(obj)|indent(16) }}
138
+ {%- for arg_name in extra_metric_args if obj[arg_name] is defined and arg_name != 'allowed_extra_keys' -%}
139
+ , {{ "unit" if arg_name == "time_unit" else arg_name }}: {{ obj[arg_name]|rust }}
140
+ {%- endfor -%}
141
+ };
142
+ {% elif obj.labeled %}
143
+ LabeledMetricData::Common {
144
+ cmd: {{common_metric_data(obj)|indent(16) }},
145
+ };
146
+ {% else %}
147
+ {{ common_metric_data(obj)|indent(12) }};
148
+ {% endif %}
149
+ {{ obj|ctor }}(meta
150
+ {%- for arg_name in extra_metric_args if not obj.labeled and obj[arg_name] is defined and arg_name != 'allowed_extra_keys' -%}
119
151
  , {{ obj[arg_name]|rust }}
120
152
  {%- endfor -%}
121
153
  {{ ", " if obj.labeled else ")\n" }}
@@ -53,10 +53,10 @@ struct {{ obj.name|Camelize }}{{ suffix }}: EventExtras {
53
53
  {%- elif struct.type == "object" -%}
54
54
  struct {{ name }}: Codable, Equatable, ObjectSerialize {
55
55
  {% for itemname, val in struct.properties.items() %}
56
- {% if val.type == "object" %}
56
+ {% if val.type == "array" %}
57
+ var {{itemname|camelize|variable_name}}: {{ name ~ itemname|Camelize }} = []
58
+ {% elif val.type == "object" %}
57
59
  var {{itemname|camelize|variable_name}}: {{ name ~ "Item" ~ itemname|Camelize ~ "Object" }}?
58
- {% elif val.type == "array" %}
59
- var {{itemname|camelize|variable_name}}: {{ name ~ "Item" ~ itemname|Camelize }}
60
60
  {% else %}
61
61
  var {{itemname|camelize|variable_name}}: {{val.type|structure_type_name}}?
62
62
  {% endif %}
@@ -72,7 +72,7 @@ struct {{ obj.name|Camelize }}{{ suffix }}: EventExtras {
72
72
 
73
73
  {% for itemname, val in struct.properties.items() %}
74
74
  {% if val.type == "array" %}
75
- {% set nested_name = name ~ "Item" ~ itemname|Camelize %}
75
+ {% set nested_name = name ~ itemname|Camelize %}
76
76
  {{ generate_structure(nested_name, val) }}
77
77
  {% elif val.type == "object" %}
78
78
  {% set nested_name = name ~ "Item" ~ itemname|Camelize ~ "Object" %}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: glean_parser
3
- Version: 14.2.0
3
+ Version: 14.4.0
4
4
  Summary: Parser tools for Mozilla's Glean telemetry
5
5
  Home-page: https://github.com/mozilla/glean_parser
6
6
  Author: The Glean Team
@@ -79,6 +79,17 @@ $ glean_parser check < ping.json
79
79
 
80
80
  ## Unreleased
81
81
 
82
+ ## 14.4.0
83
+
84
+ - Fix JS and Ruby server templates to correctly send event extra values as strings ([DENG-4405](https://mozilla-hub.atlassian.net/browse/DENG-4405))
85
+ - 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))
86
+
87
+ ## 14.3.0
88
+
89
+ - Add the `module_spec` option to the javascript_server outputter ([#726](https://github.com/mozilla/glean_parser/pull/726))
90
+ - BUGFIX: Fix the Rust codegen for changes to how `labeled_*` metrics are constructed ([bug 1909244](https://bugzilla.mozilla.org/show_bug.cgi?id=1909244))
91
+ - Generate a serializer for array wrappers ([bug 1908157](https://bugzilla.mozilla.org/show_bug.cgi?id=1908157))
92
+
82
93
  ## 14.2.0
83
94
 
84
95
  - New Metric Types: `labeled_{custom|memory|timing}_distribution` ([bug 1657947](https://bugzilla.mozilla.org/show_bug.cgi?id=1657947))
@@ -14,6 +14,7 @@ requirements_dev.txt
14
14
  setup.cfg
15
15
  setup.py
16
16
  .circleci/config.yml
17
+ .github/CODEOWNERS
17
18
  .github/ISSUE_TEMPLATE.md
18
19
  .github/dependabot.yml
19
20
  .github/pull_request_template.md
@@ -96,6 +96,9 @@ all_metrics:
96
96
  source:
97
97
  description: Source of this event
98
98
  type: string
99
+ extraKeyNOTJUSTdotted.snake:
100
+ description: An extra key with an expressive name.
101
+ type: boolean
99
102
 
100
103
  quantity:
101
104
  <<: *defaults
@@ -27,4 +27,7 @@ event:
27
27
  bob:
28
28
  description: "three"
29
29
  type: string
30
+ And1WithExtraCasing:
31
+ description: "four"
32
+ type: boolean
30
33
  expires: 2100-01-01
@@ -103,6 +103,7 @@ module Glean
103
103
  # extras to pass into event detail
104
104
  object_type:,
105
105
  object_state:,
106
+ linking:,
106
107
  # The user's FxA account ID, if available.
107
108
  identifiers_fxa_account_id:,
108
109
  # full user_agent value from controller context
@@ -116,8 +117,9 @@ module Glean
116
117
  'name' => 'object_update',
117
118
  'timestamp' => (Time.now.utc.to_f * 1000).to_i,
118
119
  'extra' => [
119
- ['object_type', object_type],
120
- ['object_state', object_state],
120
+ ['object_type', object_type.to_s],
121
+ ['object_state', object_state.to_s],
122
+ ['linking', linking.to_s],
121
123
  ].to_h,
122
124
  }},
123
125
  ]
@@ -48,3 +48,8 @@ backend:
48
48
  description: >
49
49
  A JSON representation of the latest state of the object.
50
50
  type: string
51
+ linking:
52
+ description: >
53
+ Indicates the initial linking of the Mozilla account and
54
+ the third-party account.
55
+ type: boolean
@@ -13,4 +13,5 @@ logger.record_backend_object_update(
13
13
  identifiers_fxa_account_id="test-py-project",
14
14
  object_type="some_object_type",
15
15
  object_state="some_object_state",
16
+ linking=True,
16
17
  )
@@ -283,7 +283,7 @@ def test_event_extra_keys_in_correct_order(tmp_path):
283
283
  with (tmp_path / "event.js").open("r", encoding="utf-8") as fd:
284
284
  content = fd.read()
285
285
  content = " ".join(content.split())
286
- assert '["alice", "bob", "charlie"]' in content
286
+ assert '["And1WithExtraCasing", "alice", "bob", "charlie"]' in content
287
287
 
288
288
 
289
289
  def test_arguments_are_generated_in_deterministic_order(tmp_path):
@@ -304,7 +304,7 @@ def test_arguments_are_generated_in_deterministic_order(tmp_path):
304
304
  with (tmp_path / "event.js").open("r", encoding="utf-8") as fd:
305
305
  content = fd.read()
306
306
  content = " ".join(content.split())
307
- expected = 'export const example = new EventMetricType({ category: "event", name: "example", sendInPings: ["events"], lifetime: "ping", disabled: false, }, ["alice", "bob", "charlie"]);' # noqa
307
+ expected = 'export const example = new EventMetricType({ category: "event", name: "example", sendInPings: ["events"], lifetime: "ping", disabled: false, }, ["And1WithExtraCasing", "alice", "bob", "charlie"]);' # noqa
308
308
  assert expected in content
309
309
 
310
310
 
@@ -161,6 +161,7 @@ eventLogger.recordBackendObjectUpdate({
161
161
  identifiers_fxa_account_id: 'abc',
162
162
  object_type: 'unknown',
163
163
  object_state: 'great',
164
+ linking: true,
164
165
  });
165
166
  """
166
167
 
@@ -365,11 +365,12 @@ def test_event_extra_keys_in_correct_order(tmp_path):
365
365
  content = fd.read()
366
366
  content = " ".join(content.split())
367
367
  assert "ExampleExtra(" in content
368
+ assert "and1withextracasing:" in content
368
369
  assert "alice:" in content
369
370
  assert "bob:" in content
370
371
  assert "charlie:" in content
371
372
  assert ": EventExtras" in content
372
- assert 'allowedExtraKeys = listOf("alice", "bob", "charlie")' in content
373
+ assert 'allowedExtraKeys = listOf("And1WithExtraCasing", "alice", "bob", "charlie")' in content
373
374
 
374
375
 
375
376
  def test_arguments_are_generated_in_deterministic_order(tmp_path):
@@ -392,7 +393,7 @@ def test_arguments_are_generated_in_deterministic_order(tmp_path):
392
393
  with (tmp_path / "Event.kt").open("r", encoding="utf-8") as fd:
393
394
  content = fd.read()
394
395
  content = " ".join(content.split())
395
- expected = 'EventMetricType<ExampleExtra> by lazy { // generated from event.example EventMetricType<ExampleExtra>( CommonMetricData( category = "event", name = "example", sendInPings = listOf("events"), lifetime = Lifetime.PING, disabled = false ), allowedExtraKeys = listOf("alice", "bob", "charlie")) } }' # noqa
396
+ expected = 'EventMetricType<ExampleExtra> by lazy { // generated from event.example EventMetricType<ExampleExtra>( CommonMetricData( category = "event", name = "example", sendInPings = listOf("events"), lifetime = Lifetime.PING, disabled = false ), allowedExtraKeys = listOf("And1WithExtraCasing", "alice", "bob", "charlie")) } }' # noqa
396
397
  assert expected in content
397
398
 
398
399
 
@@ -487,11 +488,11 @@ def test_object_metric(tmp_path):
487
488
  assert "data class ThreadsObject(" in content
488
489
  assert "data class ThreadsObjectItem(" in content
489
490
  assert (
490
- "var frames: ThreadsObjectItemItemFrames = ThreadsObjectItemItemFrames"
491
+ "var frames: ThreadsObjectItemFrames = ThreadsObjectItemFrames"
491
492
  in content
492
493
  )
493
494
 
494
- assert "data class ThreadsObjectItemItemFramesItem(" in content
495
+ assert "data class ThreadsObjectItemFramesItem(" in content
495
496
  assert "var moduleIndex: Int? = null," in content
496
497
  assert "var ip: String? = null," in content
497
498
  assert "var trust: String? = null," in content
@@ -194,7 +194,8 @@ def test_event_extra_keys_in_correct_order(tmp_path):
194
194
  print(content)
195
195
  content = " ".join(content.split())
196
196
  assert (
197
- r"<ul><li>alice: two</li>"
197
+ r"<ul><li>And1WithExtraCasing: four</li>"
198
+ r"<li>alice: two</li>"
198
199
  r"<li>bob: three</li>"
199
200
  r"<li>charlie: one</li></ul>" in content
200
201
  )
@@ -133,6 +133,7 @@ def test_run_logging(tmp_path):
133
133
  events.backend_object_update.record(
134
134
  object_type: "type",
135
135
  object_state: "state",
136
+ linking: true,
136
137
  identifiers_fxa_account_id: nil,
137
138
  user_agent: "glean-test/1.0",
138
139
  ip_address: "127.0.0.1"
@@ -276,13 +276,13 @@ def test_object_metric(tmp_path):
276
276
 
277
277
  assert "ObjectMetric<ThreadsObject>" in content
278
278
  assert "pub struct ThreadsObjectItem { " in content
279
- assert "frames: ThreadsObjectItemItemFrames, }" in content
279
+ assert "frames: ThreadsObjectItemFrames, }" in content
280
280
  assert (
281
- "pub type ThreadsObjectItemItemFrames = "
282
- "Vec<ThreadsObjectItemItemFramesItem>;" in content
281
+ "pub type ThreadsObjectItemFrames = "
282
+ "Vec<ThreadsObjectItemFramesItem>;" in content
283
283
  )
284
284
 
285
- assert "pub struct ThreadsObjectItemItemFramesItem { " in content
285
+ assert "pub struct ThreadsObjectItemFramesItem { " in content
286
286
  assert "module_index: Option<i64>, " in content
287
287
  assert "ip: Option<String>, " in content
288
288
  assert "trust: Option<String>, " in content
@@ -288,9 +288,9 @@ def test_event_extra_keys_in_correct_order(tmp_path):
288
288
  content = " ".join(content.split())
289
289
  assert (
290
290
  "struct ExampleExtra: EventExtras "
291
- "{ var alice: String? var bob: String? var charlie: String?" in content
291
+ "{ var and1withextracasing: Bool? var alice: String? var bob: String? var charlie: String?" in content
292
292
  )
293
- assert ', ["alice", "bob", "charlie"]' in content
293
+ assert ', ["And1WithExtraCasing", "alice", "bob", "charlie"]' in content
294
294
 
295
295
 
296
296
  def test_event_extra_keys_with_types(tmp_path):
@@ -370,11 +370,11 @@ def test_object_metric(tmp_path):
370
370
  assert "typealias ThreadsObject = [ThreadsObjectItem]" in content
371
371
  assert "struct ThreadsObjectItem: Codable, Equatable, ObjectSerialize {" in content
372
372
  assert (
373
- "var frames: ThreadsObjectItemItemFrames"
373
+ "var frames: ThreadsObjectItemFrames"
374
374
  in content
375
375
  )
376
376
 
377
- assert "struct ThreadsObjectItemItemFramesItem: Codable, Equatable, ObjectSerialize {" in content
377
+ assert "struct ThreadsObjectItemFramesItem: Codable, Equatable, ObjectSerialize {" in content
378
378
  assert "var moduleIndex: Int64?" in content
379
379
  assert "var ip: String?" in content
380
380
  assert "var trust: String?" in content
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes