# 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 are recorded by the Glean SDK. They are
# automatically converted to Kotlin code at build time using the `glean_parser`
# PyPI package.

---

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

browser.engagement:
  click:
    type: event
    description: |
      Just testing events
    bugs:
      - https://bugzilla.mozilla.org/123456789
    data_reviews:
      - N/A
    notification_emails:
      - CHANGE-ME@example.com
    extra_keys:
      key1:
        type: string
        description: "This is key one"
      key2:
        type: string
        description: "This is key two"
    expires: 2
    metadata:
      tags:
        - testing

  event_no_keys:
    type: event
    description: |
      Just testing events without keys
    bugs:
      - https://bugzilla.mozilla.org/123456789
    data_reviews:
      - N/A
    notification_emails:
      - CHANGE-ME@example.com
    expires: 2

basic:
  os:
    type: string
    description: |
      The name of the os
    bugs:
      - https://bugzilla.mozilla.org/123456789
    data_reviews:
      - N/A
    notification_emails:
      - CHANGE-ME@example.com
    expires: 2

test:
  string_list:
    type: string_list
    description: |
      Testing StringList ping
    send_in_pings:
      - test-string-list
      - sample
    lifetime: user
    bugs:
      - https://bugzilla.mozilla.org/123456789
    data_reviews:
      - N/A
    notification_emails:
      - CHANGE-ME@example.com
    expires: 2
    no_lint:
      - USER_LIFETIME_EXPIRATION
    metadata:
      tags:
        - testing

  counter:
    type: counter
    description: |
      Testing counter
    send_in_pings:
      - test-string-list
      - sample
    lifetime: user
    bugs:
      - https://bugzilla.mozilla.org/123456789
    data_reviews:
      - N/A
    notification_emails:
      - CHANGE-ME@example.com
    expires: 2
    no_lint:
      - USER_LIFETIME_EXPIRATION
    metadata:
      tags:
        - testing

  timespan:
    type: timespan
    description: |
      Testing a timespan
    time_unit: microsecond
    lifetime: application
    bugs:
      - https://bugzilla.mozilla.org/1508948
    data_reviews:
      - N/A
    notification_emails:
      - CHANGE-ME@example.com
    expires: 2

  is_started:
    type: boolean
    description: |
      Testing boolean
    send_in_pings:
      - baseline
      - sample
    lifetime: application
    bugs:
      - https://bugzilla.mozilla.org/1234567890
    data_reviews:
      - N/A
    notification_emails:
      - CHANGE-ME@test-only.com
    expires: 2
    no_lint:
      - BASELINE_PING

custom:
  counter:
    type: counter
    description: |
      A custom counter that goes on a custom ping
    lifetime: ping
    send_in_pings:
      - sample
    bugs:
      - https://bugzilla.mozilla.org/1547330
    data_reviews:
      - N/A
    notification_emails:
      - CHANGE-ME@test-only.com
    expires: 2
  bg_counter:
    type: counter
    description: |
      A custom counter incremented in background process
    lifetime: ping
    send_in_pings:
      - background
    bugs:
      - https://bugzilla.mozilla.org/1547330
    data_reviews:
      - N/A
    notification_emails:
      - CHANGE-ME@test-only.com
    expires: 2

legacy_ids:
  client_id:
    type: uuid
    description: |
      Testing deletion request payload
    send_in_pings:
      - deletion-request
    bugs:
      - https://bugzilla.mozilla.org/1654811
    data_reviews:
      - N/A
    notification_emails:
      - CHANGE-ME@example.com
    expires: 2

party:
  balloons:
    type: object
    description: A collection of balloons
    bugs:
      - https://bugzilla.mozilla.org/TODO
    data_reviews:
      - http://example.com/reviews
    notification_emails:
      - CHANGE-ME@example.com
    expires: never
    structure:
      type: array
      items:
        type: object
        properties:
          colour:
            type: string
          diameter:
            type: number
