Skip to content

Commit 089e0a5

Browse files
committed
Merge branch 'release-v1.3.0' into release
2 parents deebc15 + 354c25c commit 089e0a5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+3895
-387
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ jobs:
179179
pip install -r requirements.txt
180180
glean_parser translate src/App/metrics.yaml src/App/pings.yaml \
181181
-f javascript -o src/App/generated \
182-
--option platform=qt --option version="1.2"
182+
--option platform=qt --option version="1.3"
183183
- run:
184184
name: Run Qt sample tests
185185
command: |

.github/auto_assign.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ reviewers:
55
- Dexterp37
66
- travis79
77
- chutten
8+
- rosahbruno
89
numberOfReviewers: 1
910
skipKeywords:
1011
- Bump

.vscode/launch.json

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
{
2+
// **NOTE**
3+
// For the tests to succeed if you are stepping through code, you need to
4+
// update the timeout value of the individual test suite you wish to debug.
5+
//
6+
// For example, if you want to test `tests/unit/core/metrics/timing_distribution.spec.ts`,
7+
// at the top of the `describe` callback, you need to add this line.
8+
//
9+
// `this.timeout(10000000);`
10+
//
11+
// This allows you to step through your tests and inspect values without
12+
// having them fail due to timeout.
13+
//
14+
//
15+
//
16+
// Use IntelliSense to learn about possible attributes.
17+
// Hover to view descriptions of existing attributes.
18+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
19+
"version": "0.2.0",
20+
"configurations": [
21+
{
22+
"type": "node",
23+
"request": "launch",
24+
"name": "Integration Tests",
25+
"cwd": "${workspaceFolder}/glean",
26+
"runtimeArgs": [
27+
"${workspaceFolder}/glean/node_modules/ts-mocha/bin/ts-mocha",
28+
"--experimental-modules",
29+
"--experimental-specifier-resolution=node",
30+
"--loader=ts-node/esm",
31+
"${workspaceFolder}/glean/tests/integration/**/*.spec.ts",
32+
"--recursive"
33+
],
34+
"console": "integratedTerminal"
35+
},
36+
{
37+
"type": "node",
38+
"request": "launch",
39+
"name": "Unit:Core Tests",
40+
"cwd": "${workspaceFolder}/glean",
41+
"runtimeArgs": [
42+
"${workspaceFolder}/glean/node_modules/ts-mocha/bin/ts-mocha",
43+
"--experimental-modules",
44+
"--experimental-specifier-resolution=node",
45+
"--loader=ts-node/esm",
46+
"${workspaceFolder}/glean/tests/unit/core/**/*.spec.ts",
47+
"--recursive"
48+
],
49+
"console": "integratedTerminal"
50+
},
51+
{
52+
"type": "node",
53+
"request": "launch",
54+
"name": "Unit:Plugins Tests",
55+
"cwd": "${workspaceFolder}/glean",
56+
"runtimeArgs": [
57+
"${workspaceFolder}/glean/node_modules/ts-mocha/bin/ts-mocha",
58+
"--experimental-modules",
59+
"--experimental-specifier-resolution=node",
60+
"--loader=ts-node/esm",
61+
"${workspaceFolder}/glean/tests/unit/plugins/**/*.spec.ts",
62+
"--recursive"
63+
],
64+
"console": "integratedTerminal"
65+
},
66+
{
67+
"type": "node",
68+
"request": "launch",
69+
"name": "Unit:Plugins Tests",
70+
"cwd": "${workspaceFolder}/glean",
71+
"runtimeArgs": [
72+
"${workspaceFolder}/glean/node_modules/ts-mocha/bin/ts-mocha",
73+
"--experimental-modules",
74+
"--experimental-specifier-resolution=node",
75+
"--loader=ts-node/esm",
76+
"${workspaceFolder}/glean/tests/unit/platform/**/*.spec.ts",
77+
"--recursive"
78+
],
79+
"console": "integratedTerminal"
80+
},
81+
{
82+
"type": "node",
83+
"request": "launch",
84+
"name": "Individual Test Template",
85+
"cwd": "${workspaceFolder}/glean",
86+
"runtimeArgs": [
87+
"${workspaceFolder}/glean/node_modules/ts-mocha/bin/ts-mocha",
88+
"--experimental-modules",
89+
"--experimental-specifier-resolution=node",
90+
"--loader=ts-node/esm",
91+
"${workspaceFolder}/glean/tests/unit/core/metrics/timing_distribution.spec.ts"
92+
],
93+
"console": "integratedTerminal"
94+
}
95+
]
96+
}

ARCHITECTURE.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Architecture
22

3-
This document aims to give a high level overview of the
3+
This document aims to give a high-level overview of the
44
Glean JavaScript SDK (aka Glean.js) architecture.
55

66
This is a great place to start for newcomers to the project.
@@ -11,8 +11,7 @@ the [Glean.js developer documentation](docs/README.md).
1111
## Context
1212

1313
The Glean JavaScript SDK is part of [the Glean project](https://docs.telemetry.mozilla.org/concepts/glean/glean.html).
14-
An end-to-end data collection platform developed by Mozilla and primarily targeting Mozilla products
15-
across multiple platforms.
14+
An end-to-end data collection platform developed by Mozilla and primarily targeting Mozilla products across multiple platforms.
1615

1716
Glean provides multiple client SDKs for different programming languages and platforms.
1817
One of the aspects that guide Glean SDK development is cross-platform consistency and the Glean
@@ -30,8 +29,8 @@ Firefox Desktop SDK in the [mozilla-central](https://hg.mozilla.org/mozilla-cent
3029
On a very high level a Glean SDK is a library which exposes APIs for users to record
3130
structured data and submit that data in an (again) structured format to a specific endpoint.
3231

33-
Users cannot simply record arbitrary data though. The Glean SDKs expose specialized metrics APIs for
34-
different collection needs. The SDK is responsible to validating that the data given by a user is in
32+
Users cannot simply record arbitrary data, though. The Glean SDKs expose specialized metrics APIs for
33+
different collection needs. The SDK is responsible for validating that the data given by a user is in
3534
the correct format and only then recording it (or recording an error in case the data provided is
3635
not correct).
3736

@@ -114,11 +113,9 @@ for all platforms, because each platform provides different APIs for these tasks
114113
for useless platform specific code not to bloat the size of the library on each platform,
115114
the `platform/` module contains implementations of identical interfaces in different platforms.
116115

117-
This allows the pattern of only importing the necessary implementation of these modules on each
118-
platform. It also makes testing easier, because the exact same suite of tests can run for each of
119-
the platform specific implementation, thus guaranteeing that each modules works exactly the same
120-
in all platforms.
121-
116+
This allows the pattern of only importing the necessary implementation of these modules on each platform.
117+
It also makes testing easier, because the exact same suite of tests can be run for each of the platform-specific implementations,
118+
thus guaranteeing that each module works exactly the same on all platforms.
122119
### `plugins/`
123120

124121
The `plugins/` folder contains the Glean.js' plugins code.

CHANGELOG.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
# Unreleased changes
22

3-
[Full changelog](https://github.com/mozilla/glean.js/compare/v1.2.0...main)
3+
[Full changelog](https://github.com/mozilla/glean.js/compare/v1.3.0...main)
4+
5+
# v1.3.0 (2022-10-18)
6+
7+
[Full changelog](https://github.com/mozilla/glean.js/compare/v1.2.0...v1.3.0)
8+
9+
* [#1544](https://github.com/mozilla/glean.js/pull/1544): Upgrade `glean_parser` version to `6.2.1`.
10+
* [#1516](https://github.com/mozilla/glean.js/pull/1516): Implement the Custom Distribution metric type.
11+
* [#1514](https://github.com/mozilla/glean.js/pull/1514): Implement the Memory Distribution metric type.
12+
* [#1475](https://github.com/mozilla/glean.js/pull/1475): Implement the Timing Distribution metric type.
413

514
# v1.2.0 (2022-09-21)
615

automation/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ npm run size:report
4646
4747
### Docs
4848

49-
Builds the Glean.js library for all the targeted platforms and document
49+
Builds the Glean.js library for all the targeted platforms and documents
5050
the size of the library and of each extra metric and plugin.
5151

5252
To run the script without updating the documentation:
@@ -55,7 +55,7 @@ To run the script without updating the documentation:
5555
npm run size:docs:dry
5656
```
5757

58-
To run the script and update the documentation.
58+
To run the script and update the documentation:
5959

6060
```
6161
npm run size:docs

automation/package-lock.json

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

automation/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@
2525
"selenium-webdriver": "^4.4.0",
2626
"webpack": "^5.74.0",
2727
"webpack-cli": "^4.10.0",
28-
"webpack-dev-server": "^4.11.0"
28+
"webpack-dev-server": "^4.11.1"
2929
}
3030
}

automation/size/utils.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,16 @@ const __dirname = dirname(__filename);
1717
export const METRIC_TYPES = [
1818
"boolean",
1919
"counter",
20+
"custom_distribution",
2021
"datetime",
2122
"event",
2223
"labeled",
24+
"memory_distribution",
2325
"quantity",
2426
"string",
2527
"text",
2628
"timespan",
29+
"timing_distribution",
2730
"rate",
2831
"uuid",
2932
"url",

docs/guides/adding_a_new_metric_type.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ awaiting or callbacks.
123123

124124
This is to say: any recording action must be wrapped in a `Glean.dispatcher.launch` block.
125125

126-
Continuing on the String metric type example,
127-
let's look at how a simple string recording function will look like.
126+
Continuing with the String metric type example,
127+
let's look at what a simple string recording function will look like.
128128

129129
```ts
130130
function set(value: string): void {
@@ -227,7 +227,7 @@ a new release of Glean.js is made.
227227

228228
## Other
229229

230-
Even after your are done with all the above steps, you still need to prepare other parts of the Glean
230+
Even after you are done with all the above steps, you still need to prepare other parts of the Glean
231231
ecosystem in order for you to be done implementing your new metric type.
232232

233233
### glean_parser

0 commit comments

Comments
 (0)