-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for the text metric type
This applies the following additional restrictions: 1) Metrics of this type will need to be data collection category 3 or 4. 2) Metrics of this type will only be allowed for custom pings. Sending a text metric in built-in pings is forbidden. 3) Metrics of this type will only be allowed to have a ping or application lifetime. Other lifetimes will be forbidden. Restrictions are applied through the jsonschema. This leads to okayish error messages for 1) and 3) and a suboptimal, but understandable error message for 2).
- Loading branch information
Showing
6 changed files
with
200 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Any copyright is dedicated to the Public Domain. | ||
# https://creativecommons.org/publicdomain/zero/1.0/ | ||
|
||
--- | ||
$schema: moz://mozilla.org/schemas/glean/metrics/2-0-0 | ||
|
||
valid.text: | ||
lifetime: | ||
type: text | ||
lifetime: ping | ||
send_in_pings: | ||
- custom | ||
description: | | ||
dummy metric | ||
bugs: | ||
- https://bugzilla.mozilla.org/11137353 | ||
data_reviews: | ||
- http://example.com/reviews | ||
notification_emails: | ||
- CHANGE-ME@example.com | ||
expires: 2100-01-01 | ||
data_sensitivity: | ||
- highly_sensitive | ||
no_lint: | ||
- EXPIRATION_DATE_TOO_FAR | ||
|
||
sensitivity: | ||
type: text | ||
lifetime: ping | ||
send_in_pings: | ||
- custom | ||
description: | | ||
dummy metric | ||
bugs: | ||
- https://bugzilla.mozilla.org/11137353 | ||
data_reviews: | ||
- http://example.com/reviews | ||
notification_emails: | ||
- CHANGE-ME@example.com | ||
expires: 2100-01-01 | ||
data_sensitivity: | ||
- web_activity | ||
no_lint: | ||
- EXPIRATION_DATE_TOO_FAR |
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,63 @@ | ||
# Any copyright is dedicated to the Public Domain. | ||
# https://creativecommons.org/publicdomain/zero/1.0/ | ||
|
||
--- | ||
$schema: moz://mozilla.org/schemas/glean/metrics/2-0-0 | ||
|
||
invalid.text: | ||
lifetime: | ||
type: text | ||
lifetime: user | ||
send_in_pings: | ||
- custom | ||
description: | | ||
dummy metric | ||
bugs: | ||
- https://bugzilla.mozilla.org/11137353 | ||
data_reviews: | ||
- http://example.com/reviews | ||
notification_emails: | ||
- CHANGE-ME@example.com | ||
expires: 2100-01-01 | ||
data_sensitivity: | ||
- highly_sensitive | ||
no_lint: | ||
- EXPIRATION_DATE_TOO_FAR | ||
|
||
sensitivity: | ||
type: text | ||
lifetime: ping | ||
send_in_pings: | ||
- custom | ||
description: | | ||
dummy metric | ||
bugs: | ||
- https://bugzilla.mozilla.org/11137353 | ||
data_reviews: | ||
- http://example.com/reviews | ||
notification_emails: | ||
- CHANGE-ME@example.com | ||
expires: 2100-01-01 | ||
data_sensitivity: | ||
- technical | ||
no_lint: | ||
- EXPIRATION_DATE_TOO_FAR | ||
|
||
builtin_pings: | ||
type: text | ||
lifetime: ping | ||
send_in_pings: | ||
- metrics | ||
description: | | ||
dummy metric | ||
bugs: | ||
- https://bugzilla.mozilla.org/11137353 | ||
data_reviews: | ||
- http://example.com/reviews | ||
notification_emails: | ||
- CHANGE-ME@example.com | ||
expires: 2100-01-01 | ||
data_sensitivity: | ||
- highly_sensitive | ||
no_lint: | ||
- EXPIRATION_DATE_TOO_FAR |
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