# 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/metrics/2-0-0
$tags:
  - 'Firefox :: IP Protection'

ipprotection:
  enabled:
    type: boolean
    description: >
      True if IP Protection is running.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1972711
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1972711
    data_sensitivity:
      - interaction
    notification_emails:
      - kpatenio@mozilla.com
    expires: never

  toggled:
    type: event
    description: >
      Recorded when IP Protection is toggled.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1972711
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1972711
    data_sensitivity:
      - interaction
    notification_emails:
      - kpatenio@mozilla.com
    expires: never
    extra_keys:
      enabled:
        type: boolean
        description: >
          True if IP Protection was turned on.
      userAction:
        type: boolean
        description: >
          If the VPN was connected or disconnected by a user action.
      duration:
        type: string
        description: >
          Amount of time the VPN was connnected in a session.
  click_upgrade_button:
    type: event
    description: >
      This is recorded when a user clicks the upgrade button in the VPN panel.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1972930
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1972930
    notification_emails:
      - rking@mozilla.com
    expires: never
  usage_tx:
    type: memory_distribution
    memory_unit: byte
    description: >
      Bytes transmitted (outgoing) while IP Protection is running.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1976028
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1976028
    data_sensitivity:
      - interaction
    notification_emails:
      - sstreich@mozilla.com
      - vpn-telemetry@mozilla.com
    expires: never

  usage_rx:
    type: memory_distribution
    memory_unit: byte
    description: >
      Bytes transmitted (incoming) while IP Protection is running.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1976028
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1976028
    data_sensitivity:
      - interaction
    notification_emails:
      - sstreich@mozilla.com
      - vpn-telemetry@mozilla.com
    expires: never
