Skip to content

Commit 2d546f2

Browse files
committed
Merge branch 'release-v5.0.1' into release
2 parents 0a487ca + b5a41b5 commit 2d546f2

File tree

15 files changed

+1531
-1043
lines changed

15 files changed

+1531
-1043
lines changed

CHANGELOG.md

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

3-
[Full changelog](https://github.com/mozilla/glean.js/compare/v5.0.0...main)
3+
[Full changelog](https://github.com/mozilla/glean.js/compare/v5.0.1...main)
4+
5+
# v5.0.1 (2024-04-30)
6+
7+
[Full changelog](https://github.com/mozilla/glean.js/compare/v5.0.0...v5.0.1)
8+
9+
* [#1923](https://github.com/mozilla/glean.js/pull/1923): Bumped `glean_parser` version to `14.0.1`.
10+
* [#1921](https://github.com/mozilla/glean.js/pull/1921): BUGFIX: Fix issue causing `glean.client.annotation.experimentation_id` metric to not get added in certain pings.
11+
* [#1919](https://github.com/mozilla/glean.js/pull/1919): Add `glean.page_id` to Glean automatic events.
412

513
# v5.0.0 (2024-03-25)
614

automation/package-lock.json

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

automation/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
"browserstack-local": "^1.5.5",
2525
"geckodriver": "^4.3.3",
2626
"patch-package": "^8.0.0",
27-
"selenium-webdriver": "^4.18.1",
28-
"webpack": "^5.90.3",
27+
"selenium-webdriver": "^4.19.0",
28+
"webpack": "^5.91.0",
2929
"webpack-cli": "^5.1.4",
30-
"webpack-dev-server": "^5.0.3"
30+
"webpack-dev-server": "^5.0.4"
3131
}
3232
}

docs/reference/metrics.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- AUTOGENERATED BY glean_parser v10.0.3. DO NOT EDIT. -->
1+
<!-- AUTOGENERATED BY glean_parser v14.0.1. DO NOT EDIT. -->
22

33
# Metrics
44

@@ -102,9 +102,10 @@ In addition to those built-in metrics, the following metrics are added to the pi
102102
| Name | Type | Description | Data reviews | Extras | Expiration | [Data Sensitivity](https://wiki.mozilla.org/Firefox/Data_Collection) |
103103
| --- | --- | --- | --- | --- | --- | --- |
104104
| glean.element_click |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A event triggered whenever an html element is clicked on a page. **Clicks are recorded only for those html elements that have at least one of the `data-glean-*` data attributes. By default, this event is not collected automatically. Collection can be turned on by clients via Glean configuration object (`enableAutoElementClickEvents`). Glean also provides a separate API for clients to record element clicks manually.** |[Bug 1867294](https://bugzilla.mozilla.org/show_bug.cgi?id=1867294#c29)|<ul><li>id: An identifier of the element clicked. For automatic collection, its value is the element's `data-glean-id` data attribute value.</li><li>label: The label of the element clicked. For automatic collection, its value is the element's `data-glean-label` data attribute value.</li><li>type: The type of the element clicked. For automatic collection, its value is the element's `data-glean-type` data attribute value.</li></ul>|never |2 |
105+
| glean.page_id |[uuid](https://mozilla.github.io/glean/book/user/metrics/uuid.html) |Uniquely identifies a page_load, not the page itself, for the purpose of associating other events with the specific page load event. This gets rotated with each page load and is sent along with each event ping. |[Bug 1888430](https://bugzilla.mozilla.org/show_bug.cgi?id=1888430)||never |1 |
105106
| glean.page_load |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A event triggered whenever a page is loaded. **This event by default is not collected automatically. This can be turned on by the client in the Glean configuration object (`enableAutoPageLoadEvents`). Glean provides a separate API for collecting the same page load data if the client wants to collect page loads manually.** |[Bug 1867126](https://bugzilla.mozilla.org/show_bug.cgi?id=1867126#c8)|<ul><li>referrer: The page referrer.</li><li>title: The page title.</li><li>url: The page URL.</li></ul>|never |2 |
106107

107108
Data categories are [defined here](https://wiki.mozilla.org/Firefox/Data_Collection).
108109

109-
<!-- AUTOGENERATED BY glean_parser v10.0.3. DO NOT EDIT. -->
110+
<!-- AUTOGENERATED BY glean_parser v14.0.1. DO NOT EDIT. -->
110111

glean/package-lock.json

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

glean/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mozilla/glean",
3-
"version": "5.0.0",
3+
"version": "5.0.1",
44
"description": "An implementation of the Glean SDK, a modern cross-platform telemetry client, for JavaScript environments.",
55
"type": "module",
66
"sideEffects": false,

glean/src/cli.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const LOG_TAG = "CLI";
2727
const VIRTUAL_ENVIRONMENT_DIR = process.env.VIRTUAL_ENV || path.join(process.cwd(), ".venv");
2828

2929
// The version of glean_parser to install from PyPI.
30-
const GLEAN_PARSER_VERSION = "10.0.3";
30+
const GLEAN_PARSER_VERSION = "14.0.1";
3131

3232
// This script runs a given Python module as a "main" module, like
3333
// `python -m module`. However, it first checks that the installed

glean/src/core/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export const GLEAN_SCHEMA_VERSION = 1;
88
//
99
// PACKAGE_VERSION is defined as a global by webpack,
1010
// we need a default here for testing when the app is not build with webpack.
11-
export const GLEAN_VERSION = "5.0.0";
11+
export const GLEAN_VERSION = "5.0.1";
1212

1313
// The name of a "ping" that will include Glean ping_info metrics,
1414
// such as ping sequence numbers.

glean/src/core/glean_metrics.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
44

55
import { Context } from "./context.js";
6+
import UUIDMetric from "./metrics/types/uuid.js";
67
import EventMetricType from "./metrics/types/event.js";
78
import { EVENTS_PING_NAME } from "./constants.js";
89
import { Lifetime } from "./metrics/lifetime.js";
@@ -51,6 +52,15 @@ namespace GleanMetrics {
5152
},
5253
// extras defined in `src/metrics.yaml`.
5354
["id", "type", "label"]
55+
),
56+
pageId: new UUIDMetric(
57+
{
58+
category: "glean",
59+
name: "page_id",
60+
sendInPings: [EVENTS_PING_NAME],
61+
lifetime: Lifetime.Application,
62+
disabled: false,
63+
}
5464
)
5565
};
5666

@@ -72,6 +82,9 @@ namespace GleanMetrics {
7282
return;
7383
}
7484

85+
// Rotate the page_id for each page_load event.
86+
metrics.pageId.generateAndSet();
87+
7588
// Each key defaults to the override. If no override is provided, we fall
7689
// back to the default value IF the `window` or the `document` objects
7790
// are available.

glean/src/core/pings/common_ping_data.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,7 @@ export default interface CommonPingData {
1717

1818
// Currently NOT IMPLEMENTED.
1919
readonly preciseTimestamps?: boolean;
20+
readonly includeInfoSections?: boolean;
21+
readonly enabled?: boolean;
22+
readonly schedulesPings?: string[];
2023
}

0 commit comments

Comments
 (0)