# 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:
  - 'Core :: SQLite and Embedded Database Bindings'

sqlite_store:
  open:
    type: dual_labeled_counter
    description: >
      The result of attempting to open a SQLite file.

      Initially this metric also recorded the "success" category, but due
      to the high volume of recording those, only failure categories are
      now tracked.
    dual_labels:
      key:
        description: No static keys unfortunately.
      category:
        labels:
          - failure
          - access
          - diskio
          - corrupt
          - busy
          - misuse
          - diskspace
        description: The result type when opening a SQLite file.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1635489
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1977614
      - https://bugzilla.mozilla.org/show_bug.cgi?id=2046474
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1635489
    notification_emails:
      - dtownsend@mozilla.com
      - mbonardo@mozilla.com
    expires: never

  query:
    type: dual_labeled_counter
    description: >
      The result of attempting to query a SQLite file.

      Initially this metric also recorded the "success" category, but due
      to the high volume of recording those, only failure categories are
      now tracked.
    dual_labels:
      key:
        description: No static keys unfortunately.
      category:
        labels:
          - failure
          - access
          - diskio
          - corrupt
          - busy
          - misuse
          - diskspace
        description: The result type when querying a SQLite file.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1635489
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1977614
      - https://bugzilla.mozilla.org/show_bug.cgi?id=2046474
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1635489
    notification_emails:
      - dtownsend@mozilla.com
      - mbonardo@mozilla.com
    expires: never
