This repository has been archived by the owner on Apr 27, 2023. It is now read-only.
Introduce Glean.js for collecting data #505
Merged
Merged
Changes from 13 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
097fa4e
Make sure Python is available on CI
Dexterp37 f589103
Update the .gitignore to exclude Glean stuff
Dexterp37 0651a20
Add Glean.js to Rally
Dexterp37 0965aba
Generate Glean artifacts when building Rally
Dexterp37 645494a
Initialize Glean and enable ping encryption
Dexterp37 913bce5
Make sure to build the addon before running tests
Dexterp37 ef0c417
Disable 'preferBuiltins' to load local utils
Dexterp37 f9ffdef
Resolve imports exported using "browser"
Dexterp37 1c0c112
Add the 'config-enable-glean' Rollup option
Dexterp37 99ea753
Add a simple test for the Rally id in Glean
Dexterp37 ab3c0f3
Add a CHANGELOG entry
Dexterp37 d37be7c
Ensure the right dependencies are available on TaskCluster
Dexterp37 8955cb3
Remove pings.yaml
Dexterp37 0a2c9b7
Do not use async exec in setupTaskcluster.js
Dexterp37 File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<!-- AUTOGENERATED BY glean_parser. DO NOT EDIT. --> | ||
|
||
# Metrics | ||
|
||
This document enumerates the metrics collected by this project using the [Glean SDK](https://mozilla.github.io/glean/book/index.html). | ||
This project may depend on other projects which also collect metrics. | ||
This means you might have to go searching through the dependency tree to get a full picture of everything collected by this project. | ||
|
||
# Pings | ||
|
||
- [deletion-request](#deletion-request) | ||
- [onboarding](#onboarding) | ||
|
||
## deletion-request | ||
|
||
This is a built-in ping that is assembled out of the box by the Glean SDK. | ||
|
||
See the Glean SDK documentation for the [`deletion-request` ping](https://mozilla.github.io/glean/book/user/pings/deletion-request.html). | ||
|
||
All Glean pings contain built-in metrics in the [`ping_info`](https://mozilla.github.io/glean/book/user/pings/index.html#the-ping_info-section) and [`client_info`](https://mozilla.github.io/glean/book/user/pings/index.html#the-client_info-section) sections. | ||
|
||
In addition to those built-in metrics, the following metrics are added to the ping: | ||
|
||
| Name | Type | Description | Data reviews | Extras | Expiration | [Data Sensitivity](https://wiki.mozilla.org/Firefox/Data_Collection) | | ||
| --- | --- | --- | --- | --- | --- | --- | | ||
| rally.id |[uuid](https://mozilla.github.io/glean/book/user/metrics/uuid.html) |The id of the Rally client. |[Review 1](TODO)||never | | | ||
|
||
## onboarding | ||
|
||
All Glean pings contain built-in metrics in the [`ping_info`](https://mozilla.github.io/glean/book/user/pings/index.html#the-ping_info-section) and [`client_info`](https://mozilla.github.io/glean/book/user/pings/index.html#the-client_info-section) sections. | ||
|
||
In addition to those built-in metrics, the following metrics are added to the ping: | ||
|
||
| Name | Type | Description | Data reviews | Extras | Expiration | [Data Sensitivity](https://wiki.mozilla.org/Firefox/Data_Collection) | | ||
| --- | --- | --- | --- | --- | --- | --- | | ||
| rally.id |[uuid](https://mozilla.github.io/glean/book/user/metrics/uuid.html) |The id of the Rally client. |[Review 1](TODO)||never | | | ||
|
||
Data categories are [defined here](https://wiki.mozilla.org/Firefox/Data_Collection). | ||
|
||
<!-- AUTOGENERATED BY glean_parser. DO NOT EDIT. --> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# This Source Code Form is subject to the terms of the Mozilla Public | ||
# License, v. 2.0. If a copy of the MPL was not distributed with this | ||
# file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
|
||
# This file defines the metrics that are recorded by the Glean SDK. | ||
# APIs to use these pings are automatically generated at build time using | ||
# the `glean_parser` PyPI package. | ||
|
||
# Metrics in this file may make use of SDK reserved ping names. See | ||
# https://mozilla.github.io/glean/book/dev/core/internal/reserved-ping-names.html | ||
# for additional information. | ||
|
||
--- | ||
$schema: moz://mozilla.org/schemas/glean/metrics/2-0-0 | ||
|
||
rally: | ||
id: | ||
type: uuid | ||
lifetime: user | ||
send_in_pings: | ||
- deletion-request | ||
- onboarding | ||
description: | | ||
The id of the Rally client. | ||
bugs: | ||
- https://github.com/mozilla-rally/rally-core-addon/issues/117 | ||
data_reviews: | ||
- TODO | ||
notification_emails: | ||
- than@mozilla.com | ||
expires: never |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
import * as exec from "child_process"; | ||
import { promisify } from "util"; | ||
|
||
// Define an async/await version of "exec". | ||
const execAsync = promisify(exec.exec); | ||
|
||
// If this is not running on TaskCluster, exit | ||
// without an error code. | ||
if ('TASK_ID' in process.env) { | ||
console.log("Running in TaskCluster. Running set-up."); | ||
|
||
// The TaskCluster instance on the Mozilla add-ons pipeline | ||
// does not allow image customization, so python3 venv cannot | ||
// be installed. That package is required for Glean to build. | ||
// We make sure to have all the dependencies in place when on | ||
// TaskCluster by running the commands manually. | ||
execAsync("sudo apt-get -y install python3-venv"); | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh, why do you want this to be async? Doesn't seem like it matters here, and it's not being
await
'd or anything.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No real reason, it was copy 🍝 !