# 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 will be gathered for the "fxaclient"
# storage component.
# These are emitted for all users of the component.  Additional metrics
# specific to the *syncing* of fxaclient are defined in a separate "sync_ping"
# package.
#
# Changes to these metrics require data review, which should take into
# consideration
# the following known consumers of the fxaclient component Android bindings:
#
#  * Fenix for Android

---
$schema: moz://mozilla.org/schemas/glean/metrics/2-0-0

fxa_client:
  operation_count:
    type: counter
    description: The total number of operations performed by the FxA client.
    bugs:
      - https://github.com/mozilla/application-services/issues/5871
    data_reviews:
      - https://github.com/mozilla/application-services/issues/5872
    data_sensitivity:
      - interaction
    notification_emails:
      - bdk@mozilla.com
      - synced-client-integrations@mozilla.com
    expires: "never"

  error_count:
    type: labeled_counter
    description: >
      The total number of errors encountered during FxA operations, labeled by type.
      It is intended to be used together with `operation_count` to measure
      the overall error rate of FxA operations operations.
    labels:
      - network
      - authentication
      - no_existing_auth_flow
      - origin_mismatch
      - fxa_other
      - unexpected
    bugs:
      - https://github.com/mozilla/application-services/issues/5871
    data_reviews:
      - https://github.com/mozilla/application-services/issues/5872
    data_sensitivity:
      - interaction
    notification_emails:
      - bdk@mozilla.com
      - synced-client-integrations@mozilla.com
    expires: "never"
