tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

metrics.yaml (10923B)


      1 # This Source Code Form is subject to the terms of the Mozilla Public
      2 # License, v. 2.0. If a copy of the MPL was not distributed with this
      3 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
      4 
      5 # Adding a new metric? We have docs for that!
      6 # https://firefox-source-docs.mozilla.org/toolkit/components/glean/user/new_definitions_file.html
      7 
      8 ---
      9 $schema: moz://mozilla.org/schemas/glean/metrics/2-0-0
     10 $tags:
     11  - 'Core :: Storage: Quota Manager'
     12 
     13 dom.quota.try:
     14  error_step:
     15    type: event
     16    description: >
     17      An event recorded on an error of the quota manager or its clients.
     18      Since errors are usually propagated up the call chain, all such
     19      propagation steps are recorded for an error. This is only active
     20      during specific contexts, in particular during storage
     21      initialization. No dynamic data is included in the event beyond the
     22      error code which will be added through Bug 1670555.
     23      This event was generated to correspond to the Legacy Telemetry event
     24      dom.quota.try.error#step.
     25    bugs:
     26      - https://bugzil.la/1665088
     27    data_reviews:
     28      - https://bugzil.la/1665088
     29    notification_emails:
     30      - jan.varga@gmail.com
     31      - storage-telemetry@mozilla.com
     32    expires: never
     33    extra_keys:
     34      context:
     35        description: >
     36          The context in which the error occurred, e.g. during a storage initialization.
     37          Telemetry events are only emitted for selected contexts.
     38        type: string
     39      frame_id:
     40        description: >
     41          Optionally, the frame within stack_id.
     42        type: string
     43      process_id:
     44        description: >
     45          Optionally, the process in which the error occured.
     46        type: string
     47      result:
     48        description: >
     49          Optionally, the name of the error that occurred.
     50        type: string
     51      seq:
     52        description: >
     53          Sequence number.
     54        type: quantity
     55      severity:
     56        description: >
     57          One of WARNING or ERROR.
     58        type: string
     59      source_file:
     60        description: >
     61          The name of the source code file where the error occurred.
     62        type: string
     63      source_line:
     64        description: >
     65          The line within source_file where the error occurred.
     66        type: quantity
     67      stack_id:
     68        description: >
     69          Optionally, the stack within process_id.
     70        type: string
     71    telemetry_mirror: DomQuotaTry_Error_Step
     72 quotamanager:
     73  restore_origin_directory_metadata_counter:
     74    type: counter
     75    description: >
     76      Increments each time QuotaManager::RestoreDirectoryMetadata2 is called to
     77      restore origin directory metadata. This typically occurs when expected
     78      directory metadata is missing or needs to be regenerated. The counter is
     79      incremented regardless of whether the restoration ultimately succeeds or
     80      fails.
     81      This can provide insight into the impacts of specific code changes,
     82      including potential optimizations or regressions.
     83    bugs:
     84      - https://bugzilla.mozilla.org/show_bug.cgi?id=1961884
     85    data_reviews:
     86      - https://bugzilla.mozilla.org/show_bug.cgi?id=1961884
     87    data_sensitivity:
     88      - technical
     89    notification_emails:
     90      - jan.varga@gmail.com
     91      - storage-telemetry@mozilla.com
     92    expires: never
     93 quotamanager.initialize.repository:
     94  number_of_iterations:
     95    type: labeled_custom_distribution
     96    description: >
     97      This metric logs the count of directory entries iterated within the
     98      QuotaManager::InitializeRepository function for each repository type.
     99      Each instance of this metric is labeled with one of three repository
    100      types: "persistent", "temporary" or "default" (there's also "private"
    101      repository but that should never be iterated by the function).
    102      The main purpose is to track and analyze iteration counts during the
    103      initialization process of each repository type, helping to identify
    104      performance trends or potential inefficiencies across these repositories.
    105      This can provide insight into the impacts of specific code changes,
    106      including potential optimizations or regressions.
    107    range_min: 0
    108    range_max: 65535
    109    bucket_count: 50
    110    histogram_type: exponential
    111    unit: integer
    112    bugs:
    113      - https://bugzilla.mozilla.org/show_bug.cgi?id=1927260
    114    data_reviews:
    115      - https://bugzilla.mozilla.org/show_bug.cgi?id=1927260
    116    data_sensitivity:
    117      - technical
    118    notification_emails:
    119      - jan.varga@gmail.com
    120      - storage-telemetry@mozilla.com
    121    expires: never
    122    labels:
    123      - persistent
    124      - temporary
    125      - default
    126      - private
    127 quotamanager.initialize.temporarystorage:
    128  total_time_excluding_suspend:
    129    type: timing_distribution
    130    time_unit: millisecond
    131    description: >
    132      This metric logs the total time required to initialize temporary storage
    133      within the QuotaManager after startup on the I/O thread. The duration
    134      excludes any periods when the system was suspended (e.g. system sleep or
    135      hibernation), to better reflect actual time spent performing temporary
    136      storage initialization.
    137      The primary goal is to measure the actual runtime cost of temporary
    138      storage initialization under typical conditions, without distortion from
    139      system-level suspension delays.
    140      This data can help detect performance regressions or improvements during
    141      startup-related phases, particularly for users with significant amounts
    142      of temporary storage data on disk.
    143    bugs:
    144      - https://bugzilla.mozilla.org/show_bug.cgi?id=1955992
    145    data_reviews:
    146      - https://bugzilla.mozilla.org/show_bug.cgi?id=1955992
    147    data_sensitivity:
    148      - technical
    149    notification_emails:
    150      - jan.varga@gmail.com
    151      - storage-telemetry@mozilla.com
    152    expires: never
    153  non_persisted_zero_usage_origins:
    154    type: custom_distribution
    155    description: >
    156      Logs the number of non-persisted origins that have zero quota-charged
    157      usage after full temporary storage initialization. These origins do not
    158      store any real data but still contribute to internal bookkeeping by
    159      having directories and files created on disk, which can unnecessarily
    160      increase initialization costs. Measuring how many such origins exist in
    161      the wild helps evaluate whether the temporary storage cleanup logic
    162      should be updated to clear them. This in turn can guide potential
    163      optimizations and improve the performance of temporary storage
    164      initialization over time, while also helping to detect unexpected
    165      regressions.
    166      Note: Non-persisted origins can be cleared when they have no data, while
    167      persisted origins cannot be cleared even at zero usage because the
    168      persisted flag is currently stored alongside the origin data and would be
    169      lost.
    170    range_min: 0
    171    range_max: 65535
    172    bucket_count: 50
    173    histogram_type: exponential
    174    unit: integer
    175    bugs:
    176      - https://bugzilla.mozilla.org/show_bug.cgi?id=1975258
    177    data_reviews:
    178      - https://bugzilla.mozilla.org/show_bug.cgi?id=1975258
    179    data_sensitivity:
    180      - technical
    181    notification_emails:
    182      - jan.varga@gmail.com
    183      - storage-telemetry@mozilla.com
    184    expires: never
    185 quotamanager.shutdown:
    186  total_time_excluding_suspend:
    187    type: timing_distribution
    188    time_unit: millisecond
    189    description: >
    190      This metric logs the total time required to shut down the QuotaManager
    191      instance on the PBackground thread. The duration excludes any periods
    192      when the system was suspended (system sleep or hibernation), to better
    193      reflect actual time spent performing shutdown.
    194      While the shutdown process is measured on the PBackground thread, it
    195      involves spinning the event loop and thus waiting for operations on other
    196      threads (especially I/O threads) to complete.
    197      The primary goal is to measure the actual runtime cost of shutdown under
    198      typical conditions, without distortion from system-level suspension
    199      delays.
    200      This data can help detect performance regressions or improvements related
    201      to QuotaManager shutdown behavior, especially in scenarios involving
    202      large amounts of user storage data.
    203    bugs:
    204      - https://bugzilla.mozilla.org/show_bug.cgi?id=1590635
    205    data_reviews:
    206      - https://bugzilla.mozilla.org/show_bug.cgi?id=1590635
    207    data_sensitivity:
    208      - technical
    209    notification_emails:
    210      - jan.varga@gmail.com
    211      - storage-telemetry@mozilla.com
    212    expires: never
    213 
    214 dom.quota:
    215  info_load_time:
    216    type: labeled_timing_distribution
    217    description: >
    218      Time (ms) for the QuotaManager to load quota information. Keyed by
    219      conditions during quota info loading, see RecordTimeDeltaHelper::Run in
    220      https://searchfox.org/mozilla-central/source/dom/quota/ActorsParent.cpp
    221 
    222      This metric was generated to correspond to the Legacy Telemetry
    223      exponential histogram QM_QUOTA_INFO_LOAD_TIME_V0.
    224    time_unit: millisecond
    225    bugs:
    226      - https://bugzilla.mozilla.org/show_bug.cgi?id=1609625
    227      - https://bugzilla.mozilla.org/show_bug.cgi?id=1683102
    228    data_reviews:
    229      - https://bugzilla.mozilla.org/show_bug.cgi?id=1609625
    230      - https://bugzilla.mozilla.org/show_bug.cgi?id=1683102
    231    notification_emails:
    232      - jan.varga@gmail.com
    233      - storage-telemetry@mozilla.com
    234    expires: never
    235    telemetry_mirror: QM_QUOTA_INFO_LOAD_TIME_V0
    236 
    237  shutdown_time:
    238    type: labeled_timing_distribution
    239    description: >
    240      Time (ms) for the QuotaManager to shutdown. Keyed by conditions during
    241      shutdown, see RecordTimeDeltaHelper::Run in
    242      https://searchfox.org/mozilla-central/source/dom/quota/ActorsParent.cpp
    243 
    244      This metric was generated to correspond to the Legacy Telemetry
    245      exponential histogram QM_SHUTDOWN_TIME_V0.
    246    time_unit: millisecond
    247    bugs:
    248      - https://bugzilla.mozilla.org/show_bug.cgi?id=1824075
    249    data_reviews:
    250      - https://bugzilla.mozilla.org/show_bug.cgi?id=1824075
    251    notification_emails:
    252      - jan.varga@gmail.com
    253      - storage-telemetry@mozilla.com
    254    expires: never
    255    telemetry_mirror: QM_SHUTDOWN_TIME_V0
    256 
    257  first_initialization_attempt:
    258    type: dual_labeled_counter
    259    description: >
    260      True if the first initialization attempt succeeded, keyed by the
    261      initialization type.
    262 
    263      This metric was generated to correspond to the Legacy Telemetry boolean
    264      histogram QM_FIRST_INITIALIZATION_ATTEMPT.
    265    dual_labels:
    266      key:
    267        description: No static keys unfortunately.
    268      category:
    269        labels:
    270          - "false"
    271          - "true"
    272        description: Boolean
    273    bugs:
    274      - https://bugzilla.mozilla.org/show_bug.cgi?id=1592934
    275    data_reviews:
    276      - https://bugzilla.mozilla.org/show_bug.cgi?id=1592934
    277    notification_emails:
    278      - jan.varga@gmail.com
    279      - storage-telemetry@mozilla.com
    280    expires: never
    281    telemetry_mirror: QM_FIRST_INITIALIZATION_ATTEMPT