# 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 :: Networking'

networking:
  speculative_connect_outcome:
    type: labeled_counter
    description: >
      Counts the occurrence of each outcome of a speculative connection
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=909865
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=909865
    data_sensitivity:
      - technical
    notification_emails:
      - necko@mozilla.com
      - acreskey@mozilla.com
    expires: never
    labels:
      - successful
      - aborted_socket_limit
      - aborted_socket_fail
      - aborted_https_not_enabled
    telemetry_mirror: NETWORKING_SPECULATIVE_CONNECT_OUTCOME

  cookie_timestamp_fixed_count:
    type: labeled_counter
    description: >
      Counts the number of times a cookie's invalid timestamp was fixed when
      reading it from the DB.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1828126
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1828126#c5
    data_sensitivity:
      - technical
    notification_emails:
      - necko@mozilla.com
      - vgosu@mozilla.com
    labels:
      - creationTime
      - lastAccessed
    expires: never

  cookie_creation_fixup_diff:
    type: custom_distribution
    unit: second
    description: >
      If we fix up a cookie creation timestamp that is in the future this
      metric records the number of seconds that timestamp was off from NOW.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1828126
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1828126#c5
    data_sensitivity:
      - technical
    notification_emails:
      - necko@mozilla.com
      - vgosu@mozilla.com
    expires: never
    range_min: 0
    range_max: 315360000000
    bucket_count: 100
    histogram_type: exponential

  cookie_access_fixup_diff:
    type: custom_distribution
    unit: second
    description: >
      If we fix up a cookie lastAccessed timestamp that is in the future this
      metric records the number of seconds that timestamp was off from NOW.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1828126
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1828126#c5
    data_sensitivity:
      - technical
    notification_emails:
      - necko@mozilla.com
      - vgosu@mozilla.com
    expires: never
    range_min: 0
    range_max: 315360000000
    bucket_count: 100
    histogram_type: exponential

  cookie_count_total:
    type: custom_distribution
    description: >
      Reports the total number of cookies in storage
    range_min: 0
    range_max: 4000
    bucket_count: 22
    histogram_type: exponential
    unit: integer
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1828942
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1892158
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1828942#TDB
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1892158
    data_sensitivity:
      - technical
    notification_emails:
      - necko@mozilla.com
      - edgul@mozilla.com
    expires: 134

  cookie_count_partitioned:
    type: custom_distribution
    description: >
      Reports the number of partitioned cookies in storage
    range_min: 0
    range_max: 4000
    bucket_count: 22
    histogram_type: exponential
    unit: integer
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1828942
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1892158
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1828942#TDB
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1892158
    data_sensitivity:
      - technical
    notification_emails:
      - necko@mozilla.com
      - edgul@mozilla.com
    expires: 134

  cookie_count_unpartitioned:
    type: custom_distribution
    description: >
      Reports the number of unpartitioned cookies in storage
    range_min: 0
    range_max: 4000
    bucket_count: 22
    histogram_type: exponential
    unit: integer
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1828942
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1892158
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1828942#TDB
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1892158
    data_sensitivity:
      - technical
    notification_emails:
      - necko@mozilla.com
      - edgul@mozilla.com
    expires: 134

  cookie_count_part_by_key:
    type: custom_distribution
    description: >
      A distribution of the partitioned cookies in storage belonging to
      a particular cookie key (host + origin attributes)
    range_min: 1
    range_max: 220
    bucket_count: 10
    histogram_type: exponential
    unit: integer
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1828942
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1892158
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1828942#TDB
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1892158
    data_sensitivity:
      - technical
    notification_emails:
      - necko@mozilla.com
      - edgul@mozilla.com
    expires: 134

  cookie_count_unpart_by_key:
    type: custom_distribution
    description: >
      A distribution of the unpartitioned cookies in storage belonging to
      a particular cookie key (host + origin attributes)
    range_min: 1
    range_max: 220
    bucket_count: 10
    histogram_type: exponential
    unit: integer
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1828942
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1892158
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1828942#TDB
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1892158
    data_sensitivity:
      - technical
    notification_emails:
      - necko@mozilla.com
      - edgul@mozilla.com
    expires: 134

  cookie_purge_max:
    type: custom_distribution
    description: >
      A distribution of the number of cookies purged across
      all host + OAs as a result of exceeding the cookie maximum threshold
      (single purge)
    range_min: 1
    range_max: 4000
    bucket_count: 22
    histogram_type: exponential
    unit: integer
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1828942
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1892158
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1828942#TDB
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1892158
    data_sensitivity:
      - technical
    notification_emails:
      - necko@mozilla.com
      - edgul@mozilla.com
    expires: 134

  cookie_purge_entry_max:
    type: custom_distribution
    description: >
      A distribution of the number of cookies purged for a single
      host + OA entry as a result of exceeding the maximum threshold
      for the given host + OA (single purge)
    range_min: 1
    range_max: 220
    bucket_count: 10
    histogram_type: exponential
    unit: integer
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1828942
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1892158
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1828942#TDB
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1892158
    data_sensitivity:
      - technical
    notification_emails:
      - necko@mozilla.com
      - edgul@mozilla.com
    expires: 134

  set_cookie:
    type: counter
    description: >
      This counts the number of times we set a cookie. Introduced
      as a denomenator for measuring CHIPS adoption.
    bugs:
      - https://bugzilla.mozilla.org/1865199
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1865199#c3
    notification_emails:
      - bvandersloot@mozilla.com
    expires: 132

  set_cookie_foreign:
    type: rate
    description: >
      This counts the number of times we set a cookie from a foreign (not
      same-site) context. Introduced as a denomenator for measuring CHIPS
      adoption.
    bugs:
      - https://bugzilla.mozilla.org/1865199
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1865199#c3
    notification_emails:
      - bvandersloot@mozilla.com
    expires: 132
    denominator_metric: networking.set_cookie

  set_cookie_partitioned:
    type: rate
    description: >
      This counts the number of times we set a cookie that has the Partitioned
      attribute. This tracks the adoption of CHIPS.
    bugs:
      - https://bugzilla.mozilla.org/1865199
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1865199#c3
    notification_emails:
      - bvandersloot@mozilla.com
    expires: 132
    denominator_metric: networking.set_cookie

  set_cookie_foreign_partitioned:
    type: rate
    description: >
      This counts the number of times we set a cookie that has the Partitioned
      attribute in a foreign (not same-site) context. This tracks the adoption
      of CHIPS.
    bugs:
      - https://bugzilla.mozilla.org/1865199
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1865199#c3
    notification_emails:
      - bvandersloot@mozilla.com
    expires: 132
    denominator_metric: networking.set_cookie

  dns_lookup_time:
    type: timing_distribution
    time_unit: millisecond
    description: >
      Time for a successful DNS resolution (msec) |
      Migrated from Firefox Telemetry's `DNS_LOOKUP_TIME`.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1838240
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1838240#c6
    data_sensitivity:
      - technical
    notification_emails:
      - necko@mozilla.com
      - acreskey@mozilla.com
    expires: never
    telemetry_mirror: DNS_LOOKUP_TIME

  dns_renewal_time:
    type: timing_distribution
    time_unit: millisecond
    description: >
      Time for a renewed DNS OS resolution (msec) |
      Migrated from Firefox Telemetry's `DNS_RENEWAL_TIME`.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1838240
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1838240#c6
    data_sensitivity:
      - technical
    notification_emails:
      - necko@mozilla.com
      - acreskey@mozilla.com
    expires: never
    telemetry_mirror: DNS_RENEWAL_TIME

  dns_renewal_time_for_ttl:
    type: timing_distribution
    time_unit: millisecond
    description: >
      Time for a DNS OS resolution (msec) used to get TTL |
      Migrated from Firefox Telemetry's `DNS_RENEWAL_TIME_FOR_TTL`.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1838240
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1838240#c6
    data_sensitivity:
      - technical
    notification_emails:
      - necko@mozilla.com
      - acreskey@mozilla.com
    expires: never
    telemetry_mirror: DNS_RENEWAL_TIME_FOR_TTL

  dns_failed_lookup_time:
    type: timing_distribution
    time_unit: millisecond
    description: >
      Time for an unsuccessful DNS OS resolution (msec) |
      Migrated from Firefox Telemetry's `DNS_FAILED_LOOKUP_TIME`.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1838240
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1838240#c6
    data_sensitivity:
      - technical
    notification_emails:
      - necko@mozilla.com
      - acreskey@mozilla.com
    expires: never
    telemetry_mirror: DNS_FAILED_LOOKUP_TIME

  dns_native_https_call_time:
    type: timing_distribution
    time_unit: millisecond
    description: >
      Time spent in the call to the native OS DNS resolution.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1885529
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1885529
    data_sensitivity:
      - technical
    notification_emails:
      - necko@mozilla.com
      - vgosu@mozilla.com
    expires: never

  dns_native_count:
    type: labeled_counter
    description: >
      The count of calls to the native DNS APIs
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1879165
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1879165
    data_sensitivity:
      - technical
    notification_emails:
      - vgosu@mozilla.com
      - necko@mozilla.com
    expires: 140
    labels:
      - regular
      - private
      - https_regular
      - https_private

  http_content_onstart_delay:
    type: timing_distribution
    time_unit: millisecond
    description: >
      The time between dispatching OnStartRequest from the socket thread and processing it on the main thread (content process).
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1857926
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1857926#c
    data_sensitivity:
      - technical
    notification_emails:
      - necko@mozilla.com
      - rjesup@mozilla.com
    expires: 130

  http_content_onstop_delay:
    type: timing_distribution
    time_unit: millisecond
    description: >
      The time between dispatching OnStopRequest from the socket thread and processing it on the main thread (content process).
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1857926
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1857926#c
    data_sensitivity:
      - technical
    notification_emails:
      - necko@mozilla.com
      - rjesup@mozilla.com
    expires: 130

  http_content_ondatafinished_delay:
    type: timing_distribution
    time_unit: millisecond
    description: >
      The time between dispatching OnDataFinished from the socket thread and processing it.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1857615
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1857615#c
    data_sensitivity:
      - technical
    notification_emails:
      - necko@mozilla.com
      - rjesup@mozilla.com
    expires: 130

  http_content_ondatafinished_to_onstop_delay:
    type: timing_distribution
    time_unit: millisecond
    description: >
      The time between processing OnDataFinished and processing OnStopRequest (if OnDataFinished comes first)
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1857615
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1857615#c
    data_sensitivity:
      - technical
    notification_emails:
      - necko@mozilla.com
      - rjesup@mozilla.com
    expires: 130

  http_content_html5parser_ondatafinished_to_onstop_delay:
    type: timing_distribution
    time_unit: millisecond
    description: >
      The time between processing OnDataFinished and processing OnStopRequest (if OnDataFinished comes first)
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1857926
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1857926
    data_sensitivity:
      - technical
    notification_emails:
      - necko@mozilla.com
      - rjesup@mozilla.com
    expires: 130

  http_content_cssloader_ondatafinished_to_onstop_delay:
    type: timing_distribution
    time_unit: millisecond
    description: >
      The time between processing OnDataFinished and processing OnStopRequest for CSSLoader in the content process
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1883391
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1883391
    data_sensitivity:
      - technical
    notification_emails:
      - necko@mozilla.com
    expires: 130

  http_onstart_suspend_total_time:
    type: timing_distribution
    time_unit: millisecond
    telemetry_mirror: HTTP_ONSTART_SUSPEND_TOTAL_TIME
    description: >
      Time in milliseconds that http channel spent suspended between AsyncOpen and OnStartRequest.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1897209
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1347948
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1897209
    notification_emails:
      - necko@mozilla.com
    expires: never

  http_1_download_throughput:
    type: custom_distribution
    unit: mbps
    range_min: 0
    range_max: 10000
    bucket_count: 100
    histogram_type: exponential
    description: >
     The download throughput for  http/1.0, http/1.1 requests larger than 10MB. Measured in megabits per second, Mbps.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1846798
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1846798#c2
    data_sensitivity:
      - technical
    notification_emails:
      - necko@mozilla.com
      - acreskey@mozilla.com
    expires: never
    telemetry_mirror: NETWORKING_DOWNLOAD_THROUGHPUT_HTTP_1

  http_2_download_throughput:
    type: custom_distribution
    unit: mbps
    range_min: 0
    range_max: 10000
    bucket_count: 100
    histogram_type: exponential
    description: >
     The download throughput for http/2 requests larger than 10MB. Measured in megabits per second, Mbps.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1846798
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1846798#c2
    data_sensitivity:
      - technical
    notification_emails:
      - necko@mozilla.com
      - acreskey@mozilla.com
    expires: never
    telemetry_mirror: NETWORKING_DOWNLOAD_THROUGHPUT_HTTP_2

  http_3_download_throughput:
    type: custom_distribution
    unit: mbps
    range_min: 0
    range_max: 10000
    bucket_count: 100
    histogram_type: exponential
    description: >
     The download throughput for http/3 requests larger than 10MB. Measured in megabits per second, Mbps.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1846798
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1846798#c2
    data_sensitivity:
      - technical
    notification_emails:
      - necko@mozilla.com
      - acreskey@mozilla.com
    expires: never
    telemetry_mirror: NETWORKING_DOWNLOAD_THROUGHPUT_HTTP_3

  http_1_upload_throughput:
    type: custom_distribution
    unit: mbps
    range_min: 0
    range_max: 5000
    bucket_count: 100
    histogram_type: exponential
    description: >
     The upload throughput for http/1.0, http/1.1 requests larger than 10MB. Measured in megabits per second, Mbps.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1858256
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1858256#c2
    data_sensitivity:
      - technical
    notification_emails:
      - necko@mozilla.com
      - acreskey@mozilla.com
    expires: never
    telemetry_mirror: HTTP_UPLOAD_THROUGHPUT_MBPS_HTTP_1

  http_2_upload_throughput:
    type: custom_distribution
    unit: mbps
    range_min: 0
    range_max: 5000
    bucket_count: 100
    histogram_type: exponential
    description: >
     The upload throughput for http/2 requests larger than 10MB. Measured in megabits per second, Mbps.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1858256
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1858256#c2
    data_sensitivity:
      - technical
    notification_emails:
      - necko@mozilla.com
      - acreskey@mozilla.com
    expires: never
    telemetry_mirror: HTTP_UPLOAD_THROUGHPUT_MBPS_HTTP_2

  http_3_upload_throughput:
    type: custom_distribution
    unit: mbps
    range_min: 0
    range_max: 5000
    bucket_count: 100
    histogram_type: exponential
    description: >
     The upload throughput for http/3 requests larger than 10MB. Measured in megabits per second, Mbps.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1858256
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1858256#c2
    data_sensitivity:
      - technical
    notification_emails:
      - necko@mozilla.com
      - acreskey@mozilla.com
    expires: never
    telemetry_mirror: HTTP_UPLOAD_THROUGHPUT_MBPS_HTTP_3

  http_1_upload_throughput_10_50:
    type: custom_distribution
    unit: mbps
    range_min: 0
    range_max: 5000
    bucket_count: 100
    histogram_type: exponential
    description: >
     The upload throughput for http/1.0, http/1.1 request size between 10MB and 50MB. Measured in megabits per second, Mbps.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1866739
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1858256#c2
    data_sensitivity:
      - technical
    notification_emails:
      - necko@mozilla.com
      - kershaw@mozilla.com
    expires: never
    telemetry_mirror: HTTP_UPLOAD_THROUGHPUT_MBPS_HTTP_1_10_50

  http_1_upload_throughput_50_100:
    type: custom_distribution
    unit: mbps
    range_min: 0
    range_max: 5000
    bucket_count: 100
    histogram_type: exponential
    description: >
     The upload throughput for http/1.0, http/1.1 request size between 50MB and 100MB. Measured in megabits per second, Mbps.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1866739
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1858256#c2
    data_sensitivity:
      - technical
    notification_emails:
      - necko@mozilla.com
      - kershaw@mozilla.com
    expires: never
    telemetry_mirror: HTTP_UPLOAD_THROUGHPUT_MBPS_HTTP_1_50_100

  http_1_upload_throughput_100:
    type: custom_distribution
    unit: mbps
    range_min: 0
    range_max: 5000
    bucket_count: 100
    histogram_type: exponential
    description: >
     The upload throughput for http/1.0, http/1.1 request size larger than 100MB. Measured in megabits per second, Mbps.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1866739
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1858256#c2
    data_sensitivity:
      - technical
    notification_emails:
      - necko@mozilla.com
      - kershaw@mozilla.com
    expires: never
    telemetry_mirror: HTTP_UPLOAD_THROUGHPUT_MBPS_HTTP_1_100

  http_2_upload_throughput_10_50:
    type: custom_distribution
    unit: mbps
    range_min: 0
    range_max: 5000
    bucket_count: 100
    histogram_type: exponential
    description: >
     The upload throughput for http/2 request size between 10MB and 50MB. Measured in megabits per second, Mbps.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1866739
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1858256#c2
    data_sensitivity:
      - technical
    notification_emails:
      - necko@mozilla.com
      - kershaw@mozilla.com
    expires: never
    telemetry_mirror: HTTP_UPLOAD_THROUGHPUT_MBPS_HTTP_2_10_50

  http_2_upload_throughput_50_100:
    type: custom_distribution
    unit: mbps
    range_min: 0
    range_max: 5000
    bucket_count: 100
    histogram_type: exponential
    description: >
     The upload throughput for http/2 request size between 50MB and 100MB. Measured in megabits per second, Mbps.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1866739
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1858256#c2
    data_sensitivity:
      - technical
    notification_emails:
      - necko@mozilla.com
      - kershaw@mozilla.com
    expires: never
    telemetry_mirror: HTTP_UPLOAD_THROUGHPUT_MBPS_HTTP_2_50_100

  http_2_upload_throughput_100:
    type: custom_distribution
    unit: mbps
    range_min: 0
    range_max: 5000
    bucket_count: 100
    histogram_type: exponential
    description: >
     The upload throughput for http/2 request size larger than 100MB. Measured in megabits per second, Mbps.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1866739
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1858256#c2
    data_sensitivity:
      - technical
    notification_emails:
      - necko@mozilla.com
      - kershaw@mozilla.com
    expires: never
    telemetry_mirror: HTTP_UPLOAD_THROUGHPUT_MBPS_HTTP_2_100

  http_3_upload_throughput_10_50:
    type: custom_distribution
    unit: mbps
    range_min: 0
    range_max: 5000
    bucket_count: 100
    histogram_type: exponential
    description: >
     The upload throughput for http/3 request size between 10MB and 50MB. Measured in megabits per second, Mbps.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1866739
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1858256#c2
    data_sensitivity:
      - technical
    notification_emails:
      - necko@mozilla.com
      - kershaw@mozilla.com
    expires: never
    telemetry_mirror: HTTP_UPLOAD_THROUGHPUT_MBPS_HTTP_3_10_50

  http_3_upload_throughput_50_100:
    type: custom_distribution
    unit: mbps
    range_min: 0
    range_max: 5000
    bucket_count: 100
    histogram_type: exponential
    description: >
     The upload throughput for http/3 request size between 50MB and 100MB. Measured in megabits per second, Mbps.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1866739
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1858256#c2
    data_sensitivity:
      - technical
    notification_emails:
      - necko@mozilla.com
      - kershaw@mozilla.com
    expires: never
    telemetry_mirror: HTTP_UPLOAD_THROUGHPUT_MBPS_HTTP_3_50_100

  http_3_upload_throughput_100:
    type: custom_distribution
    unit: mbps
    range_min: 0
    range_max: 5000
    bucket_count: 100
    histogram_type: exponential
    description: >
     The upload throughput for http/3 request size larger than 100MB. Measured in megabits per second, Mbps.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1866739
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1858256#c2
    data_sensitivity:
      - technical
    notification_emails:
      - necko@mozilla.com
      - kershaw@mozilla.com
    expires: never
    telemetry_mirror: HTTP_UPLOAD_THROUGHPUT_MBPS_HTTP_3_100

  residual_cache_folder_count:
    type: counter
    description: >
      Counts how often we find a cache folder that wasn't purged
      at shutdown by a background task process.
    bugs:
      - https://bugzilla.mozilla.org/1848542
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1848542
    notification_emails:
      - vgosu@mozilla.com
    expires: 136

  residual_cache_folder_removal:
    type: labeled_counter
    description: >
      Counts how often succeed/fail in removing cache folder
      that wasn't purged at shutdown
    bugs:
      - https://bugzilla.mozilla.org/1848542
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1848542
    notification_emails:
      - vgosu@mozilla.com
    expires: 136
    labels:
      - success
      - failure

  trr_request_count:
    type: labeled_counter
    description: >
      The count of successful TRR requests keyed by regular/private browsing
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1866245
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1866245
    notification_emails:
      - vgosu@mozilla.com
      - necko@mozilla.com
    expires: 130
    labels:
      - regular
      - private

  http_response_version:
    type: labeled_counter
    description: >
      HTTP protocol version used on response from nsHttp.h
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1876776
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1876776#c2
    notification_emails:
      - necko@mozilla.com
    expires: never
    labels:
      - unknown
      - http_1
      - http_2
      - http_3

  https_rr_presented:
    type: labeled_counter
    description: >
      HTTPS RR is presented or not
    bugs:
      - https://bugzilla.mozilla.org/1686421
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1686421
    notification_emails:
      - necko@mozilla.com
      - kershaw@mozilla.com
    expires: never
    labels:
      - presented
      - presented_with_http3
      - none

  https_upgrade_with_https_rr:
    type: labeled_counter
    description: >
      Whether an HTTP request gets upgraded to HTTPS because of HTTPS RR
    bugs:
      - https://bugzilla.mozilla.org/1686421
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1686421
    notification_emails:
      - necko@mozilla.com
      - kershaw@mozilla.com
    expires: never
    labels:
      - https_rr
      - others

  http_channel_onstart_success_https_rr:
    type: labeled_counter
    description: >
      Successfully started HTTP channels when HTTPS RR is used
    bugs:
      - https://bugzilla.mozilla.org/1682552
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1682552
    notification_emails:
      - necko@mozilla.com
      - kershaw@mozilla.com
    expires: never
    labels:
      - success
      - failure
      - success_ech_used
      - failure_ech_used

  http_channel_page_open_to_first_sent:
    type: timing_distribution
    time_unit: millisecond
    description: >
      Time in milliseconds from AsyncOpen to first byte of request sent,
      applicable for page loads without HTTPS RR
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1697480
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1697480
    data_sensitivity:
      - technical
    notification_emails:
      - necko@mozilla.com
      - kershaw@mozilla.com
    expires: never

  http_channel_sub_open_to_first_sent:
    type: timing_distribution
    time_unit: millisecond
    description: >
      Time in milliseconds from AsyncOpen to first byte of request sent,
      applicable for sub-resource loads without HTTPS RR
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1697480
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1697480
    data_sensitivity:
      - technical
    notification_emails:
      - necko@mozilla.com
      - kershaw@mozilla.com
    expires: never

  http_channel_page_open_to_first_sent_https_rr:
    type: timing_distribution
    time_unit: millisecond
    description: >
      Time in milliseconds from AsyncOpen to first byte of request sent,
      applicable for page loads with HTTPS RR
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1697480
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1697480
    data_sensitivity:
      - technical
    notification_emails:
      - necko@mozilla.com
      - kershaw@mozilla.com
    expires: never

  http_channel_sub_open_to_first_sent_https_rr:
    type: timing_distribution
    time_unit: millisecond
    description: >
      Time in milliseconds from AsyncOpen to first byte of request sent,
      applicable for sub-resource loads with HTTPS RR
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1697480
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1697480
    data_sensitivity:
      - technical
    notification_emails:
      - necko@mozilla.com
      - kershaw@mozilla.com
    expires: never

  transaction_wait_time_https_rr:
    type: timing_distribution
    time_unit: millisecond
    description: >
      Time from submission to dispatch of transaction when HTTPS RR is used (ms)
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1697480
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1697480
    data_sensitivity:
      - technical
    notification_emails:
      - necko@mozilla.com
      - kershaw@mozilla.com
    expires: never

  proxy_info_type:
    type: labeled_counter
    description: >
      The proxies configurations created in the browser session (SOCKSv4, SOCKSv5, HTTP, HTTPS)
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1879848
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1879848
    data_sensitivity:
      - technical
    notification_emails:
      - necko@mozilla.com
      - manuel@mozilla.com
    expires: 135
    labels:
      - http
      - https
      # SOCKS4 Proxy
      - socks4
      # SOCKS4a Proxy. Proxy resolves URL hostname
      - socks4a
      # SOCKS5 Proxy
      - socks5
      # SOCKS5 Proxy. Proxy resolves URL hostname
      # Use convention from curl for socks5 proxies that resolve the hostname
      # https://curl.se/libcurl/c/CURLOPT_PROXY.html
      - socks5h
      # No proxy
      - direct
      - unknown

  transaction_wait_time:
    type: timing_distribution
    time_unit: millisecond
    description: >
      Time from submission to dispatch of transaction without HTTPS RR (ms)
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1697480
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1697480
    data_sensitivity:
      - technical
    notification_emails:
      - necko@mozilla.com
      - kershaw@mozilla.com
    expires: never
