# 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/. # 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: - 'Toolkit :: Push Service' background_notification_helper: wake: type: counter description: > Number of times the background notification helper woke Firefox to receive push messages, counted when Firefox is launched with --receive-push-messages. bugs: - https://bugzilla.mozilla.org/show_bug.cgi?id=2072736 data_reviews: - https://bugzilla.mozilla.org/show_bug.cgi?id=2072736 data_sensitivity: - technical notification_emails: - desktop-integrations@mozilla.com expires: never wake_messages: type: custom_distribution description: > Number of push messages that arrived during a single background notification helper wake, recorded once per wake just before Firefox stops receiving. Only messages that got as far as being dispatched count; ones that failed before that are counted by `web_push.error_code` instead. range_min: 1 range_max: 50 bucket_count: 51 histogram_type: linear unit: push messages bugs: - https://bugzilla.mozilla.org/show_bug.cgi?id=2072736 data_reviews: - https://bugzilla.mozilla.org/show_bug.cgi?id=2072736 data_sensitivity: - technical notification_emails: - desktop-integrations@mozilla.com expires: never wake_notifications: type: custom_distribution description: > Number of web notifications shown during a single background notification helper wake, recorded once per wake just before Firefox stops receiving, and counted from the `web-notification-shown` notification. This is not the number of notifications the wake ultimately produced: a service worker shows its notification some time after the push message arrives, and receiving stops on a timer that does not wait for it, so anything shown after that point is missed. Private browsing notifications are never counted, and neither are non-web-content ones. range_min: 1 range_max: 50 bucket_count: 51 histogram_type: linear unit: notifications bugs: - https://bugzilla.mozilla.org/show_bug.cgi?id=2072736 data_reviews: - https://bugzilla.mozilla.org/show_bug.cgi?id=2072736 data_sensitivity: - technical notification_emails: - desktop-integrations@mozilla.com expires: never toggled: type: labeled_counter description: > Number of times the user turned the background notification helper on or off, labelled with the state it was turned to. This counts the user's own switch only: the Nimbus-owned gate that can withdraw the feature is not a user action and is not counted here, so a client whose helper stops because the gate closed records nothing. labels: - enabled - disabled bugs: - https://bugzilla.mozilla.org/show_bug.cgi?id=2072736 data_reviews: - https://bugzilla.mozilla.org/show_bug.cgi?id=2072736 data_sensitivity: - interaction notification_emails: - desktop-integrations@mozilla.com expires: never