Bug 1913421: Introduce metrics.yaml and pings.yaml. r=mossop,tjr

Differential Revision: https://phabricator.services.mozilla.com/D226021
This commit is contained in:
Fatih
2024-12-18 16:17:04 +00:00
parent 943d76b336
commit a8e8ca23b6
3 changed files with 384 additions and 0 deletions

View File

@@ -0,0 +1,361 @@
# 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 https://mozilla.org/MPL/2.0/.
# Adding a new metric? We have docs for that!
# https://firefox-source-docs.mozilla.org/toolkit/components/glean/user/new_definitions_file.html
$schema: moz://mozilla.org/schemas/glean/metrics/2-0-0
$tags:
- "Core :: Privacy: Anti-Tracking"
# Puzzle = Type of captcha that asks the user to solve a challenge, like selecting all images with traffic lights.
# Challange = Any type of captcha that is not a puzzle. Captchas that depend on browser fingerprint, IP address trust score and etc. are considered challenges.
# Captcha = A generic term for puzzles and challenges.
# Do note that many puzzle based captchas are also challenges, as they also factor in the user's browser fingerprint, IP address trust score and etc.
# We use some abbreviations in some metric names.
# Puzzle related: pc = puzzle completed, ac = auto completed
# Challenge related: cc = challenge completed, cf = challenge failed
# General: PBM = Private Browsing Mode
captcha_detection:
# Captcha states in normal browsing
google_recaptcha_v2_ps:
type: counter
description: >
Number of times the user has seen a Google reCAPTCHA v2 puzzle since last ping submission.
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1913421
data_reviews:
- https://phabricator.services.mozilla.com/D226021#7994299
notification_emails:
- tritter@mozilla.com
send_in_pings:
- captcha-detection
expires: never
data_sensitivity:
- interaction
google_recaptcha_v2_pc:
type: counter
description: >
Number of times the user completed a Google reCAPTCHA v2 puzzle since last ping submission.
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1913421
data_reviews:
- https://phabricator.services.mozilla.com/D226021#7994299
notification_emails:
- tritter@mozilla.com
send_in_pings:
- captcha-detection
expires: never
data_sensitivity:
- interaction
google_recaptcha_v2_ac:
type: counter
description: >
Number of times the user completed a Google reCAPTCHA v2 challenge automatically since last ping submission.
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1913421
data_reviews:
- https://phabricator.services.mozilla.com/D226021#7994299
notification_emails:
- tritter@mozilla.com
send_in_pings:
- captcha-detection
expires: never
data_sensitivity:
- interaction
cloudflare_turnstile_cc:
type: counter
description: >
Number of times the Cloudflare Turnstile challenge was successfully completed since last ping submission.
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1913421
data_reviews:
- https://phabricator.services.mozilla.com/D226021#7994299
notification_emails:
- tritter@mozilla.com
send_in_pings:
- captcha-detection
expires: never
data_sensitivity:
- interaction
cloudflare_turnstile_cf:
type: counter
description: >
Number of times the Cloudflare Turnstile challenge was failed since last ping submission.
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1913421
data_reviews:
- https://phabricator.services.mozilla.com/D226021#7994299
notification_emails:
- tritter@mozilla.com
send_in_pings:
- captcha-detection
expires: never
data_sensitivity:
- interaction
# Captcha states in private browsing
google_recaptcha_v2_ps_pbm:
type: counter
description: >
Number of times the user has seen a Google reCAPTCHA v2 puzzle since last ping submission.
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1913421
data_reviews:
- https://phabricator.services.mozilla.com/D226021#7994299
notification_emails:
- tritter@mozilla.com
send_in_pings:
- captcha-detection
expires: never
data_sensitivity:
- interaction
google_recaptcha_v2_pc_pbm:
type: counter
description: >
Number of times the user completed a Google reCAPTCHA v2 puzzle since last ping submission.
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1913421
data_reviews:
- https://phabricator.services.mozilla.com/D226021#7994299
notification_emails:
- tritter@mozilla.com
send_in_pings:
- captcha-detection
expires: never
data_sensitivity:
- interaction
google_recaptcha_v2_ac_pbm:
type: counter
description: >
Number of times the user completed a Google reCAPTCHA v2 challenge automatically since last ping submission.
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1913421
data_reviews:
- https://phabricator.services.mozilla.com/D226021#7994299
notification_emails:
- tritter@mozilla.com
send_in_pings:
- captcha-detection
expires: never
data_sensitivity:
- interaction
cloudflare_turnstile_cc_pbm:
type: counter
description: >
Number of times the Cloudflare Turnstile challenge was successfully completed since last ping submission.
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1913421
data_reviews:
- https://phabricator.services.mozilla.com/D226021#7994299
notification_emails:
- tritter@mozilla.com
send_in_pings:
- captcha-detection
expires: never
data_sensitivity:
- interaction
cloudflare_turnstile_cf_pbm:
type: counter
description: >
Number of times the Cloudflare Turnstile challenge was failed since last ping submission.
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1913421
data_reviews:
- https://phabricator.services.mozilla.com/D226021#7994299
notification_emails:
- tritter@mozilla.com
send_in_pings:
- captcha-detection
expires: never
data_sensitivity:
- interaction
# Privacy settings in normal browsing at the time of the ping
network_cookie_cookiebehavior:
type: string
description: >
The user's cookie behavior setting at the time of data collection.
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1913421
data_reviews:
- https://phabricator.services.mozilla.com/D226021#7994299
notification_emails:
- tritter@mozilla.com
send_in_pings:
- captcha-detection
expires: never
data_sensitivity:
- interaction
privacy_trackingprotection_enabled:
type: boolean
description: >
Whether the user has enabled tracking protection at the time of data collection.
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1913421
data_reviews:
- https://phabricator.services.mozilla.com/D226021#7994299
notification_emails:
- tritter@mozilla.com
send_in_pings:
- captcha-detection
expires: never
data_sensitivity:
- interaction
privacy_trackingprotection_cryptomining_enabled:
type: boolean
description: >
Whether the user has enabled cryptomining protection at the time of data collection.
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1913421
data_reviews:
- https://phabricator.services.mozilla.com/D226021#7994299
notification_emails:
- tritter@mozilla.com
send_in_pings:
- captcha-detection
expires: never
data_sensitivity:
- interaction
privacy_trackingprotection_fingerprinting_enabled:
type: boolean
description: >
Whether the user has enabled known fingerprinters protection at the time of data collection.
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1913421
data_reviews:
- https://phabricator.services.mozilla.com/D226021#7994299
notification_emails:
- tritter@mozilla.com
send_in_pings:
- captcha-detection
expires: never
data_sensitivity:
- interaction
privacy_fingerprintingprotection:
type: boolean
description: >
Whether the user has enabled suspected fingerprinters protection at the time of data collection.
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1913421
data_reviews:
- https://phabricator.services.mozilla.com/D226021#7994299
notification_emails:
- tritter@mozilla.com
send_in_pings:
- captcha-detection
expires: never
data_sensitivity:
- interaction
network_cookie_cookiebehavior_optinpartitioning:
type: boolean
description: >
Whether the user has enabled cookie partitioning at the time of data collection.
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1913421
data_reviews:
- https://phabricator.services.mozilla.com/D226021#7994299
notification_emails:
- tritter@mozilla.com
send_in_pings:
- captcha-detection
expires: never
data_sensitivity:
- interaction
privacy_resistfingerprinting:
type: boolean
description: >
Whether the user has enabled resist fingerprinting at the time of data collection.
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1913421
data_reviews:
- https://phabricator.services.mozilla.com/D226021#7994299
notification_emails:
- tritter@mozilla.com
send_in_pings:
- captcha-detection
expires: never
data_sensitivity:
- interaction
# Privacy settings in private browsing at the time of the ping
privacy_trackingprotection_pbm_enabled:
type: boolean
description: >
Whether the user has enabled tracking protection in PBM at the time of data collection.
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1913421
data_reviews:
- https://phabricator.services.mozilla.com/D226021#7994299
notification_emails:
- tritter@mozilla.com
send_in_pings:
- captcha-detection
expires: never
data_sensitivity:
- interaction
privacy_fingerprintingprotection_pbm:
type: boolean
description: >
Whether the user has enabled suspected fingerprinters protection in PBM at the time of data collection.
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1913421
data_reviews:
- https://phabricator.services.mozilla.com/D226021#7994299
notification_emails:
- tritter@mozilla.com
send_in_pings:
- captcha-detection
expires: never
data_sensitivity:
- interaction
network_cookie_cookiebehavior_optinpartitioning_pbm:
type: boolean
description: >
Whether the user has enabled cookie partioning in PBM at the time of data collection.
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1913421
data_reviews:
- https://phabricator.services.mozilla.com/D226021#7994299
notification_emails:
- tritter@mozilla.com
send_in_pings:
- captcha-detection
expires: never
data_sensitivity:
- interaction
privacy_resistfingerprinting_pbmode:
type: boolean
description: >
Whether the user has enabled resist fingerprinting in PBM at the time of data collection.
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1913421
data_reviews:
- https://phabricator.services.mozilla.com/D226021#7994299
notification_emails:
- tritter@mozilla.com
send_in_pings:
- captcha-detection
expires: never
data_sensitivity:
- interaction

View File

@@ -0,0 +1,21 @@
# 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 https://mozilla.org/MPL/2.0/.
---
$schema: moz://mozilla.org/schemas/glean/pings/2-0-0
# We submit the ping with at least 24 hours delay in between to not spam with pings. When we receive a new captcha event,
# we'll check the last submission time and submit the ping if it's been more than 24 hours since the last submission.
captcha-detection:
description: |
This ping is used to analyze the occurrence of CAPTCHAs in the wild
by users' protection settings.
include_client_id: true
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1913421
data_reviews:
- https://bugzilla.mozilla.org/show_bug.cgi?id=xxx
notification_emails:
- tritter@mozilla.com

View File

@@ -114,6 +114,7 @@ firefox_desktop_metrics = [
"browser/modules/metrics.yaml",
"dom/media/platforms/wmf/metrics.yaml",
"services/fxaccounts/metrics.yaml",
"toolkit/components/captchadetection/metrics.yaml",
"toolkit/components/contentrelevancy/metrics.yaml",
"toolkit/components/crashes/metrics.yaml",
"toolkit/components/nimbus/metrics.yaml",
@@ -183,6 +184,7 @@ firefox_desktop_pings = [
"browser/components/urlbar/pings.yaml",
"browser/modules/pings.yaml",
"services/fxaccounts/pings.yaml",
"toolkit/components/captchadetection/pings.yaml",
"toolkit/components/crashes/pings.yaml",
"toolkit/components/nimbus/pings.yaml",
"toolkit/components/telemetry/pings.yaml",