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

rtcpeerconnection:
  count_rtcp_mux_policy_negotiate:
    type: counter
    description: >
      The number of RTCPeerConnections created with rtcpMuxPolicy set to
      "negotiate". This value was removed from the spec, and we would like
      to track usage before removing it.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1339203
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1339203
    data_sensitivity:
      - technical
    notification_emails:
      - bcampen@mozilla.com
      - webrtc-telemetry-alerts@mozilla.com
    expires: never

rtcrtpsender:
  count:
    type: counter
    description: >
      The number of RTCRtpSenders created.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1401592
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1832459
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1881403
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1912188
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1969184
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1401592
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1832459
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1881403
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1912188
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1969184
    data_sensitivity:
      - technical
    notification_emails:
      - bcampen@mozilla.com
      - webrtc-telemetry-alerts@mozilla.com
    expires: never

  count_setparameters_compat:
    type: counter
    description: >
      The number of RTCRtpSenders created that use the compatibility mode for
      setParameters.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1401592
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1832459
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1881403
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1912188
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1969184
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1401592
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1832459
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1881403
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1912188
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1969184
    data_sensitivity:
      - technical
    notification_emails:
      - bcampen@mozilla.com
      - webrtc-telemetry-alerts@mozilla.com
    expires: never

  used_sendencodings:
    type: rate
    description: >
      The proportion of RTCRtpSenders that were created by an addTransceivers
      call that was passed a sendEncodings.
    denominator_metric: rtcrtpsender.count
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1401592
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1832459
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1881403
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1912188
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1401592
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1832459
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1881403
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1912188
    data_sensitivity:
      - technical
    notification_emails:
      - bcampen@mozilla.com
      - webrtc-telemetry-alerts@mozilla.com
    expires: never

rtcrtpsender.setparameters:
  warn_no_getparameters:
    type: rate
    description: >
      The proportion of RTCRtpSenders configured with the setParameters compat
      mode that have warned at least once about a setParameters call because
      [[LastReturnedParameters]] was not set.  (ie; there was not a recent
      enough call to getParameters)
    denominator_metric: rtcrtpsender.count_setparameters_compat
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1401592
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1832459
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1881403
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1912188
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1401592
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1832459
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1881403
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1912188
    data_sensitivity:
      - technical
    notification_emails:
      - bcampen@mozilla.com
      - webrtc-telemetry-alerts@mozilla.com
    expires: never

  warn_length_changed:
    type: rate
    description: >
      The proportion of RTCRtpSenders configured with the setParameters compat
      mode that have warned at least once about a setParameters call that
      attempted to change the number of encodings.
    denominator_metric: rtcrtpsender.count_setparameters_compat
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1401592
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1832459
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1881403
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1912188
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1401592
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1832459
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1881403
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1912188
    data_sensitivity:
      - technical
    notification_emails:
      - bcampen@mozilla.com
      - webrtc-telemetry-alerts@mozilla.com
    expires: never

  warn_no_transactionid:
    type: rate
    description: >
      The proportion of RTCRtpSenders configured with the setParameters compat
      mode that have warned at least once about a setParameters call that did
      not set the transactionId field.
    denominator_metric: rtcrtpsender.count_setparameters_compat
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1401592
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1832459
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1881403
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1912188
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1401592
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1832459
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1881403
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1912188
    data_sensitivity:
      - technical
    notification_emails:
      - bcampen@mozilla.com
      - webrtc-telemetry-alerts@mozilla.com
    expires: never

  fail_length_changed:
    type: rate
    description: >
      The proportion of RTCRtpSenders that have thrown an error at least once
      about a setParameters call that attempted to change the number of
      encodings.
    denominator_metric: rtcrtpsender.count
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1401592
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1832459
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1881403
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1912188
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1401592
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1832459
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1881403
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1912188
    data_sensitivity:
      - technical
    notification_emails:
      - bcampen@mozilla.com
      - webrtc-telemetry-alerts@mozilla.com
    expires: never

  fail_rid_changed:
    type: rate
    description: >
      The proportion of RTCRtpSenders that have thrown an error at least once
      about a setParameters call that attempted to change the rid on an
      encoding (note that we only check this if the encoding count did not
      change, see fail_length_changed).
    denominator_metric: rtcrtpsender.count
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1401592
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1832459
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1881403
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1912188
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1401592
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1832459
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1881403
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1912188
    data_sensitivity:
      - technical
    notification_emails:
      - bcampen@mozilla.com
      - webrtc-telemetry-alerts@mozilla.com
    expires: never

  fail_no_getparameters:
    type: rate
    description: >
      The proportion of RTCRtpSenders that have thrown an error at least once
      about a setParameters call because [[LastReturnedParameters]] was not set.
      (ie; there was not a recent enough call to getParameters)
    denominator_metric: rtcrtpsender.count
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1401592
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1832459
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1881403
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1912188
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1401592
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1832459
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1881403
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1912188
    data_sensitivity:
      - technical
    notification_emails:
      - bcampen@mozilla.com
      - webrtc-telemetry-alerts@mozilla.com
    expires: never

  fail_no_transactionid:
    type: rate
    description: >
      The proportion of RTCRtpSenders that have thrown an error at least once
      about a setParameters call that did not set the transactionId field.
    denominator_metric: rtcrtpsender.count
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1401592
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1832459
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1881403
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1912188
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1401592
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1832459
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1881403
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1912188
    data_sensitivity:
      - technical
    notification_emails:
      - bcampen@mozilla.com
      - webrtc-telemetry-alerts@mozilla.com
    expires: never

  fail_stale_transactionid:
    type: rate
    description: >
      The proportion of RTCRtpSenders that have thrown an error at least once
      about a setParameters call that used a stale transaction id.
    denominator_metric: rtcrtpsender.count
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1401592
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1832459
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1881403
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1912188
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1401592
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1832459
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1881403
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1912188
    data_sensitivity:
      - technical
    notification_emails:
      - bcampen@mozilla.com
      - webrtc-telemetry-alerts@mozilla.com
    expires: never

  fail_no_encodings:
    type: rate
    description: >
      The proportion of RTCRtpSenders configured with the setParameters compat
      mode that have thrown an error at least once about a setParameters call
      that had no encodings (we do not measure this against the general
      population of RTCRtpSenders, since without the compat mode this failure
      is never observed, because it fails the length change check).
    denominator_metric: rtcrtpsender.count_setparameters_compat
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1401592
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1832459
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1881403
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1912188
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1401592
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1832459
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1881403
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1912188
    data_sensitivity:
      - technical
    notification_emails:
      - bcampen@mozilla.com
      - webrtc-telemetry-alerts@mozilla.com
    expires: never

  fail_other:
    type: rate
    description: >
      The proportion of RTCRtpSenders that have thrown an error at least once
      about a setParameters call that had no encodings.
    denominator_metric: rtcrtpsender.count
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1401592
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1832459
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1881403
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1912188
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1401592
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1832459
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1881403
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1912188
    data_sensitivity:
      - technical
    notification_emails:
      - bcampen@mozilla.com
      - webrtc-telemetry-alerts@mozilla.com
    expires: never

codec.stats:
  ulpfec_negotiated:
    type: labeled_counter
    description: >
      Counts the number of times that ulpfec is negotiated or not negotiated
      on the first negotiation for each video transceiver.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1858213
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1881396
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1912181
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1946278
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1858213
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1881396
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1912181
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1946278
    data_sensitivity:
      - technical
    notification_emails:
      - dbaker@mozilla.com
      - webrtc-telemetry-alerts@mozilla.com
    expires: never
    labels:
      - negotiated
      - not_negotiated

  other_fec_signaled:
    type: labeled_counter
    description: >
      Count how many other fec options are being offered.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1858213
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1881396
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1912181
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1946278
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1858213
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1881396
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1912181
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1946278
    data_sensitivity:
      - technical
    notification_emails:
      - dbaker@mozilla.com
      - webrtc-telemetry-alerts@mozilla.com
    expires: never

  video_preferred_codec:
    type: labeled_counter
    description: >
      Counts the preferred video codec being signaled to us to identify preferred video codec.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1858213
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1881396
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1912181
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1946278
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1858213
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1881396
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1912181
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1946278
    data_sensitivity:
      - technical
    notification_emails:
      - dbaker@mozilla.com
      - webrtc-telemetry-alerts@mozilla.com
    expires: never

  audio_preferred_codec:
    type: labeled_counter
    description: >
      Counts the preferred audio codec being signaled to us to identify preferred audio codec.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1858213
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1881396
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1912181
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1946278
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1858213
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1881396
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1912181
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1946278
    data_sensitivity:
      - technical
    notification_emails:
      - dbaker@mozilla.com
      - webrtc-telemetry-alerts@mozilla.com
    expires: never

webrtcdtls:
  protocol_version:
    type: labeled_counter
    description: >
      The version of DTLS used for each webrtc connection. Can be 1.0, 1.2, or 1.3 (there is no 1.1 version of DTLS)
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1884140
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1884140
    data_sensitivity:
      - technical
    notification_emails:
      - bcampen@mozilla.com
      - webrtc-telemetry-alerts@mozilla.com
    expires: never

  cipher:
    type: labeled_counter
    description: >
      The CipherSuite used for each webrtc DTLS connection, as a string
      representation of the CipherSuite's ID in 4 hex digits (eg;
      TLS_DHE_RSA_WITH_AES_128_CBC_SHA would be "0x0033")
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1884140
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1884140
    data_sensitivity:
      - technical
    notification_emails:
      - bcampen@mozilla.com
      - webrtc-telemetry-alerts@mozilla.com
    expires: never

  key_exchange_algorithm:
    type: custom_distribution
    description: >
      SSL Handshake Key Exchange Algorithm (null=0, rsa=1,
      dh=2, ecdh=4, ecdh_hybrid=8)
    range_min: 0
    range_max: 16
    bucket_count: 17
    histogram_type: linear
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1983029
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1983029
    data_sensitivity:
      - technical
    notification_emails:
      - webrtc-telemetry-alerts@mozilla.com
      - seceng-telemetry@mozilla.com
    expires: 158

  srtp_cipher:
    type: labeled_counter
    description: >
      The SRTPProtectionProfile (see RFC 5764) used for each webrtc SRTP
      connection, as a string representation of the SRTPProtectionProfile's ID
      in 4 hex digits (eg; SRTP_AES128_CM_HMAC_SHA1_80 would be "0x0001")
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1884140
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1884140
    data_sensitivity:
      - technical
    notification_emails:
      - bcampen@mozilla.com
      - webrtc-telemetry-alerts@mozilla.com
    expires: never

  client_handshake_result:
    type: labeled_counter
    description: >
      The result of each webrtc client DTLS handshake as a string containing
      either the name of the error code (eg; SSL_ERROR_BAD_CERTIFICATE),
      SUCCESS for successful handshakes, ALPN_FAILURE when ALPN negotiation
      fails, or CERT_FAILURE when cert validation fails.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1884140
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1884140
    data_sensitivity:
      - technical
    notification_emails:
      - bcampen@mozilla.com
      - webrtc-telemetry-alerts@mozilla.com
    expires: never

  server_handshake_result:
    type: labeled_counter
    description: >
      The result of each webrtc server DTLS handshake, as the name of the error
      code (eg; SSL_ERROR_BAD_CERTIFICATE), the empty string for successful
      handshakes, ALPN_FAILURE when ALPN negotiation fails, or CERT_FAILURE when
      cert validation fails.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1884140
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1884140
    data_sensitivity:
      - technical
    notification_emails:
      - bcampen@mozilla.com
      - webrtc-telemetry-alerts@mozilla.com
    expires: never

  client_handshake_started_counter:
    type: counter
    description: >
      The number of webrtc transports that have started a DTLS handshake as the client.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1884140
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1884140
    data_sensitivity:
      - technical
    notification_emails:
      - bcampen@mozilla.com
      - webrtc-telemetry-alerts@mozilla.com
    expires: never

  server_handshake_started_counter:
    type: counter
    description: >
      The number of webrtc transports that have started a DTLS handshake as the server.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1884140
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1884140
    data_sensitivity:
      - technical
    notification_emails:
      - bcampen@mozilla.com
      - webrtc-telemetry-alerts@mozilla.com
    expires: never

webrtc.signaling:
  sdp_negotiated:
    type: event
    description: >
      Collects data relevant to a SDP Offer/Answer negotiation completing and
      the RTCPeerConnection's signaling state becoming stable.
      The pc_id and negotiation_count uniquely identifies these events.
    extra_keys:
      pc_id:
        description: >
          A UUID-based identifier for the RTCPeerConnection in charge of this
          SDP's negotiation.
        type: string
      negotiation_count:
        description: >
          The number of completed Offer/Answer negotiations for the associated
          RTCPeerConnection.
        type: quantity
      is_remote_ice_lite:
        description: Whether the remote peer is using ICE-Lite.
        type: boolean
      bundle_policy:
        description: The Bundle policy as set through RTCConfiguration.
        type: string
      ice_transport_policy:
        description: The ICE Transport policy as set through RTCConfiguration.
        type: string
      num_transports:
        description: >
          The number of transports used for all transceivers of the peer
          connection. Affected by BUNDLE.
        type: quantity
      num_msections_audio_recvonly:
        description: The number of audio recvonly m-sections in the SDP.
        type: quantity
      num_msections_audio_sendonly:
        description: The number of audio sendonly m-sections in the SDP.
        type: quantity
      num_msections_audio_sendrecv:
        description: The number of audio sendrecv m-sections in the SDP.
        type: quantity
      num_msections_video_recvonly:
        description: The number of video recvonly m-sections in the SDP.
        type: quantity
      num_msections_video_sendonly:
        description: The number of video sendonly m-sections in the SDP.
        type: quantity
      num_msections_video_sendrecv:
        description: The number of video sendrecv m-sections in the SDP.
        type: quantity
      num_msections_data:
        description: The number of data-channel m-sections in the SDP.
        type: quantity
    bugs:
      - https://bugzil.la/1942640
    data_reviews:
      - https://bugzil.la/1942640
    data_sensitivity:
      - technical
      - interaction
    notification_emails:
      - webrtc-telemetry-alerts@mozilla.com
    expires: never

  audio_msection_negotiated:
    type: event
    description: >
      Collects data relevant to an audio m-section as part of SDP Offer/Answer
      negotiation completing and the RTCPeerConnection's signaling state
      becoming stable.
    extra_keys:
      pc_id:
        description: >
          A UUID-based identifier for the RTCPeerConnection in charge of this
          m-section's negotiation.
        type: string
      pc_negotiation_count:
        description: >
          The number of completed Offer/Answer negotiations for the associated
          RTCPeerConnection.
        type: quantity
      has_rtcp_mux:
        description: >
          Whether muxing RTCP with RTP data was negotiated for the m-section.
        type: boolean
      direction:
        description: >
          Direction of the m-section. recvonly, sendonly, sendrecv or inactive.
        type: string
      preferred_send_codec:
        description: >
          The preferred send audio codec of the m-section. Only set if direction
          includes send.
        type: string
      preferred_recv_codec:
        description: >
          The preferred receive audio codec of the m-section. Only set if
          direction includes recv.
        type: string
      codecs:
        description: >
          All negotiated audio codecs of the m-section.
          Sorted lexicographically.
        type: string
    bugs:
      - https://bugzil.la/1942640
    data_reviews:
      - https://bugzil.la/1942640
    data_sensitivity:
      - technical
      - interaction
    notification_emails:
      - webrtc-telemetry-alerts@mozilla.com
    expires: never

  video_msection_negotiated:
    type: event
    description: >
      Collects data relevant to a video m-section as part of SDP Offer/Answer
      negotiation completing and the RTCPeerConnection's signaling state
      becoming stable.
    extra_keys:
      pc_id:
        description: >
          A UUID-based identifier for the RTCPeerConnection in charge of this
          m-section's negotiation.
        type: string
      pc_negotiation_count:
        description: >
          The number of completed Offer/Answer negotiations for the associated
          RTCPeerConnection.
        type: quantity
      has_rtcp_mux:
        description: >
          Whether muxing RTCP with RTP data was negotiated for the m-section.
        type: boolean
      direction:
        description: >
          Direction of the m-section. recvonly, sendonly, sendrecv or inactive.
        type: string
      preferred_send_codec:
        description: >
          The preferred send video codec of the m-section. Only set if direction
          includes send.
        type: string
      preferred_recv_codec:
        description: >
          The preferred receive video  codec of the m-section. Only set if
          direction includes recv.
        type: string
      codecs:
        description: >
          All negotiated video codecs of the m-section.
          Sorted lexicographically.
        type: string
      num_send_simulcast_layers:
        description: >
          The number of simulcast layers negotiated. 1 for singlecast.
          Only set for m-sections negotiated to send.
        type: quantity
    bugs:
      - https://bugzil.la/1942640
    data_reviews:
      - https://bugzil.la/1942640
    data_sensitivity:
      - technical
      - interaction
    notification_emails:
      - webrtc-telemetry-alerts@mozilla.com
    expires: never

webrtc.video:
  recv_codec_used:
    type: labeled_counter
    description: >
      The video codec used for receiving video on a WebRTC call.
      This metric was generated to correspond to the Legacy Telemetry
      scalar webrtc.video.recv_codec_used.
    bugs:
      - https://bugzil.la/1556766
    data_reviews:
      - https://bugzil.la/1556766
    notification_emails:
      - dminor@mozilla.com
      - nohlmeier@mozilla.com
    expires: never
    telemetry_mirror: WEBRTC_VIDEO_RECV_CODEC_USED

  send_codec_used:
    type: labeled_counter
    description: >
      The video codec used for sending video on a WebRTC call.
      This metric was generated to correspond to the Legacy Telemetry
      scalar webrtc.video.send_codec_used.
    bugs:
      - https://bugzil.la/1556766
    data_reviews:
      - https://bugzil.la/1556766
    notification_emails:
      - dminor@mozilla.com
      - nohlmeier@mozilla.com
    expires: never
    telemetry_mirror: WEBRTC_VIDEO_SEND_CODEC_USED

webrtc:
  video_quality_inbound_bandwidth_kbits:
    type: custom_distribution
    description: >
      Locally measured data rate of inbound video (kbit/s). Computed every
      second of a call.

      This metric was generated to correspond to the Legacy Telemetry
      exponential histogram WEBRTC_VIDEO_QUALITY_INBOUND_BANDWIDTH_KBITS.
    range_min: 1
    range_max: 1000000
    bucket_count: 1000
    histogram_type: exponential
    unit: kilobits per second
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1935420
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1935420
    notification_emails:
      - webrtc-telemetry-alerts@mozilla.com
    expires: never
    telemetry_mirror: WEBRTC_VIDEO_QUALITY_INBOUND_BANDWIDTH_KBITS

  audio_quality_inbound_bandwidth_kbits:
    type: custom_distribution
    description: >
      Locally measured data rate on inbound audio (kbit/s). Computed every
      second of a call.

      This metric was generated to correspond to the Legacy Telemetry
      exponential histogram WEBRTC_AUDIO_QUALITY_INBOUND_BANDWIDTH_KBITS.
    range_min: 1
    range_max: 1000000
    bucket_count: 1000
    histogram_type: exponential
    unit: kilobits per second
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1935420
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1935420
    notification_emails:
      - webrtc-telemetry-alerts@mozilla.com
    expires: never
    telemetry_mirror: WEBRTC_AUDIO_QUALITY_INBOUND_BANDWIDTH_KBITS

  video_quality_inbound_packetloss_rate:
    type: custom_distribution
    description: >
      Locally measured packet loss on inbound video (permille). Sampled every
      second of a call.

      This metric was generated to correspond to the Legacy Telemetry
      exponential histogram WEBRTC_VIDEO_QUALITY_INBOUND_PACKETLOSS_RATE.
    range_min: 1
    range_max: 1000
    bucket_count: 100
    histogram_type: exponential
    unit: permille
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1935420
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1935420
    notification_emails:
      - webrtc-telemetry-alerts@mozilla.com
    expires: never
    telemetry_mirror: WEBRTC_VIDEO_QUALITY_INBOUND_PACKETLOSS_RATE

  audio_quality_inbound_packetloss_rate:
    type: custom_distribution
    description: >
      Locally measured packet loss on inbound audio (permille). Sampled every
      second of a call.

      This metric was generated to correspond to the Legacy Telemetry
      exponential histogram WEBRTC_AUDIO_QUALITY_INBOUND_PACKETLOSS_RATE.
    range_min: 1
    range_max: 1000
    bucket_count: 100
    histogram_type: exponential
    unit: permille
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1935420
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1935420
    notification_emails:
      - webrtc-telemetry-alerts@mozilla.com
    expires: never
    telemetry_mirror: WEBRTC_AUDIO_QUALITY_INBOUND_PACKETLOSS_RATE

  video_quality_outbound_packetloss_rate:
    type: custom_distribution
    description: >
      RTCP-reported packet loss by remote recipient of outbound video
      (permille). Sampled every second of a call (for easy comparison).

      This metric was generated to correspond to the Legacy Telemetry
      exponential histogram WEBRTC_VIDEO_QUALITY_OUTBOUND_PACKETLOSS_RATE.
    range_min: 1
    range_max: 1000
    bucket_count: 100
    histogram_type: exponential
    unit: permille
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1935420
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1935420
    notification_emails:
      - webrtc-telemetry-alerts@mozilla.com
    expires: never
    telemetry_mirror: WEBRTC_VIDEO_QUALITY_OUTBOUND_PACKETLOSS_RATE

  audio_quality_outbound_packetloss_rate:
    type: custom_distribution
    description: >
      RTCP-reported packet loss by remote recipient of outbound audio
      (permille). Sampled every second of a call (for easy comparison).

      This metric was generated to correspond to the Legacy Telemetry
      exponential histogram WEBRTC_AUDIO_QUALITY_OUTBOUND_PACKETLOSS_RATE.
    range_min: 1
    range_max: 1000
    bucket_count: 100
    histogram_type: exponential
    unit: permille
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1935420
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1935420
    notification_emails:
      - webrtc-telemetry-alerts@mozilla.com
    expires: never
    telemetry_mirror: WEBRTC_AUDIO_QUALITY_OUTBOUND_PACKETLOSS_RATE

  video_quality_inbound_jitter:
    type: timing_distribution
    description: >
      Locally measured jitter on inbound video (ms). Sampled every second of a
      call.

      This metric was generated to correspond to the Legacy Telemetry
      exponential histogram WEBRTC_VIDEO_QUALITY_INBOUND_JITTER.
    time_unit: millisecond
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1935420
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1935420
    notification_emails:
      - webrtc-telemetry-alerts@mozilla.com
    expires: never
    telemetry_mirror: WEBRTC_VIDEO_QUALITY_INBOUND_JITTER

  audio_quality_inbound_jitter:
    type: timing_distribution
    description: >
      Locally measured jitter on inbound audio (ms). Sampled every second of a
      call.

      This metric was generated to correspond to the Legacy Telemetry
      exponential histogram WEBRTC_AUDIO_QUALITY_INBOUND_JITTER.
    time_unit: millisecond
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1935420
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1935420
    notification_emails:
      - webrtc-telemetry-alerts@mozilla.com
    expires: never
    telemetry_mirror: WEBRTC_AUDIO_QUALITY_INBOUND_JITTER

  video_quality_outbound_jitter:
    type: timing_distribution
    description: >
      RTCP-reported jitter by remote recipient of outbound video (ms). Sampled
      every second of a call (for easy comparison).

      This metric was generated to correspond to the Legacy Telemetry
      exponential histogram WEBRTC_VIDEO_QUALITY_OUTBOUND_JITTER.
    time_unit: millisecond
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1935420
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1935420
    notification_emails:
      - webrtc-telemetry-alerts@mozilla.com
    expires: never
    telemetry_mirror: WEBRTC_VIDEO_QUALITY_OUTBOUND_JITTER

  audio_quality_outbound_jitter:
    type: timing_distribution
    description: >
      RTCP-reported jitter by remote recipient of outbound audio (ms). Sampled
      every second of a call (for easy comparison).

      This metric was generated to correspond to the Legacy Telemetry
      exponential histogram WEBRTC_AUDIO_QUALITY_OUTBOUND_JITTER.
    time_unit: millisecond
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1935420
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1935420
    notification_emails:
      - webrtc-telemetry-alerts@mozilla.com
    expires: never
    telemetry_mirror: WEBRTC_AUDIO_QUALITY_OUTBOUND_JITTER

  video_quality_outbound_rtt:
    type: timing_distribution
    description: >
      Roundtrip time of outbound video (ms). Sampled every second of a call.

      This metric was generated to correspond to the Legacy Telemetry
      exponential histogram WEBRTC_VIDEO_QUALITY_OUTBOUND_RTT.
    time_unit: millisecond
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1935420
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1935420
    notification_emails:
      - webrtc-telemetry-alerts@mozilla.com
    expires: never
    telemetry_mirror: WEBRTC_VIDEO_QUALITY_OUTBOUND_RTT

  audio_quality_outbound_rtt:
    type: timing_distribution
    description: >
      Roundtrip time of outbound audio (ms). Sampled every second of a call.

      This metric was generated to correspond to the Legacy Telemetry
      exponential histogram WEBRTC_AUDIO_QUALITY_OUTBOUND_RTT.
    time_unit: millisecond
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1935420
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1935420
    notification_emails:
      - webrtc-telemetry-alerts@mozilla.com
    expires: never
    telemetry_mirror: WEBRTC_AUDIO_QUALITY_OUTBOUND_RTT

  video_encoder_bitrate_avg_per_call_kbps:
    type: custom_distribution
    description: >
      Video encoder's average bitrate (in kbits/s) over an entire call

      This metric was generated to correspond to the Legacy Telemetry
      exponential histogram WEBRTC_VIDEO_ENCODER_BITRATE_AVG_PER_CALL_KBPS.
    range_min: 1
    range_max: 10000
    bucket_count: 100
    histogram_type: exponential
    unit: kilobits per second
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1935420
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1935420
    notification_emails:
      - webrtc-telemetry-alerts@mozilla.com
    expires: never
    telemetry_mirror: WEBRTC_VIDEO_ENCODER_BITRATE_AVG_PER_CALL_KBPS

  video_encoder_bitrate_std_dev_per_call_kbps:
    type: custom_distribution
    description: >
      Standard deviation from video encoder's average bitrate (in kbits/s) over
      an entire call

      This metric was generated to correspond to the Legacy Telemetry
      exponential histogram WEBRTC_VIDEO_ENCODER_BITRATE_STD_DEV_PER_CALL_KBPS.
    range_min: 1
    range_max: 5000
    bucket_count: 100
    histogram_type: exponential
    unit: kilobits per second
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1935420
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1935420
    notification_emails:
      - webrtc-telemetry-alerts@mozilla.com
    expires: never
    telemetry_mirror: WEBRTC_VIDEO_ENCODER_BITRATE_STD_DEV_PER_CALL_KBPS

  video_encoder_framerate_avg_per_call:
    type: custom_distribution
    description: >
      Video encoder's average framerate (in fps) over an entire call

      This metric was generated to correspond to the Legacy Telemetry
      exponential histogram WEBRTC_VIDEO_ENCODER_FRAMERATE_AVG_PER_CALL.
    range_min: 1
    range_max: 200
    bucket_count: 50
    histogram_type: exponential
    unit: frames per second (fps)
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1935420
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1935420
    notification_emails:
      - webrtc-telemetry-alerts@mozilla.com
    expires: never
    telemetry_mirror: WEBRTC_VIDEO_ENCODER_FRAMERATE_AVG_PER_CALL

  video_encoder_framerate_10x_std_dev_per_call:
    type: custom_distribution
    description: >
      Standard deviation from video encoder's average framerate (in 1/10 fps)
      over an entire call

      This metric was generated to correspond to the Legacy Telemetry
      exponential histogram WEBRTC_VIDEO_ENCODER_FRAMERATE_10X_STD_DEV_PER_CALL.
    range_min: 1
    range_max: 200
    bucket_count: 50
    histogram_type: exponential
    unit: 1/10 fps
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1935420
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1935420
    notification_emails:
      - webrtc-telemetry-alerts@mozilla.com
    expires: never
    telemetry_mirror: WEBRTC_VIDEO_ENCODER_FRAMERATE_10X_STD_DEV_PER_CALL

  video_decoder_bitrate_avg_per_call_kbps:
    type: custom_distribution
    description: >
      Video decoder's average bitrate (in kbits/s) over an entire call

      This metric was generated to correspond to the Legacy Telemetry
      exponential histogram WEBRTC_VIDEO_DECODER_BITRATE_AVG_PER_CALL_KBPS.
    range_min: 1
    range_max: 10000
    bucket_count: 100
    histogram_type: exponential
    unit: kilobits per second
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1935420
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1935420
    notification_emails:
      - webrtc-telemetry-alerts@mozilla.com
    expires: never
    telemetry_mirror: WEBRTC_VIDEO_DECODER_BITRATE_AVG_PER_CALL_KBPS

  video_decoder_bitrate_std_dev_per_call_kbps:
    type: custom_distribution
    description: >
      Standard deviation from video decoder's average bitrate (in kbits/s) over
      an entire call

      This metric was generated to correspond to the Legacy Telemetry
      exponential histogram WEBRTC_VIDEO_DECODER_BITRATE_STD_DEV_PER_CALL_KBPS.
    range_min: 1
    range_max: 5000
    bucket_count: 100
    histogram_type: exponential
    unit: kilobits per second
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1935420
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1935420
    notification_emails:
      - webrtc-telemetry-alerts@mozilla.com
    expires: never
    telemetry_mirror: WEBRTC_VIDEO_DECODER_BITRATE_STD_DEV_PER_CALL_KBPS

  video_decoder_framerate_avg_per_call:
    type: custom_distribution
    description: >
      Video decoder's average framerate (in fps) over an entire call

      This metric was generated to correspond to the Legacy Telemetry
      exponential histogram WEBRTC_VIDEO_DECODER_FRAMERATE_AVG_PER_CALL.
    range_min: 1
    range_max: 200
    bucket_count: 50
    histogram_type: exponential
    unit: frames per second (fps)
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1935420
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1935420
    notification_emails:
      - webrtc-telemetry-alerts@mozilla.com
    expires: never
    telemetry_mirror: WEBRTC_VIDEO_DECODER_FRAMERATE_AVG_PER_CALL

  video_decoder_framerate_10x_std_dev_per_call:
    type: custom_distribution
    description: >
      Standard deviation from video decoder's average framerate (in 1/10 fps)
      over an entire call

      This metric was generated to correspond to the Legacy Telemetry
      exponential histogram WEBRTC_VIDEO_DECODER_FRAMERATE_10X_STD_DEV_PER_CALL.
    range_min: 1
    range_max: 200
    bucket_count: 50
    histogram_type: exponential
    unit: 1/10 fps
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1935420
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1935420
    notification_emails:
      - webrtc-telemetry-alerts@mozilla.com
    expires: never
    telemetry_mirror: WEBRTC_VIDEO_DECODER_FRAMERATE_10X_STD_DEV_PER_CALL

  video_decoder_discarded_packets_per_call_ppm:
    type: custom_distribution
    description: >
      Video decoder's number of discarded packets (in packets/min) over an
      entire call

      This metric was generated to correspond to the Legacy Telemetry
      exponential histogram WEBRTC_VIDEO_DECODER_DISCARDED_PACKETS_PER_CALL_PPM.
    range_min: 1
    range_max: 50000
    bucket_count: 100
    histogram_type: exponential
    unit: packets per minute
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1935420
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1935420
    notification_emails:
      - webrtc-telemetry-alerts@mozilla.com
    expires: never
    telemetry_mirror: WEBRTC_VIDEO_DECODER_DISCARDED_PACKETS_PER_CALL_PPM

  call_duration:
    type: timing_distribution
    description: >
      The length of time (in seconds) that a call lasted.

      This metric was generated to correspond to the Legacy Telemetry
      exponential histogram WEBRTC_CALL_DURATION.
    time_unit: second
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1571015
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1586271
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1571015
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1586271
    notification_emails:
      - webrtc-telemetry-alerts@mozilla.com
    expires: never
    telemetry_mirror: WEBRTC_CALL_DURATION

  av_call_duration:
    type: timing_distribution
    description: >
      The length of time (in seconds) that a call with audio or video in it
      lasted.

      This metric was generated to correspond to the Legacy Telemetry
      exponential histogram WEBRTC_AV_CALL_DURATION.
    time_unit: second
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1695378
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1695378
    notification_emails:
      - webrtc-telemetry-alerts@mozilla.com
    expires: never
    telemetry_mirror: WEBRTC_AV_CALL_DURATION

  call_count_3:
    type: counter
    description: >
      The number of successfully connected calls made during a session
      (discounting re-negotiations).

      This metric was generated to correspond to the Legacy Telemetry count
      histogram WEBRTC_CALL_COUNT_3.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=875097
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1261063
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1654248
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=875097
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1261063
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1654248
    notification_emails:
      - webrtc-telemetry-alerts@mozilla.com
    expires: never
    telemetry_mirror: h#WEBRTC_CALL_COUNT_3

  get_user_media_type:
    type: custom_distribution
    description: >
      Type for media in getUserMedia calls (0=Camera, 1=Screen, 2=Application,
      3=Window, 4=Browser, 5=Microphone, 6=AudioCapture, 7=Other)

      This metric was generated to correspond to the Legacy Telemetry enumerated
      histogram WEBRTC_GET_USER_MEDIA_TYPE.
    range_min: 0
    range_max: 8
    bucket_count: 9
    histogram_type: linear
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1935420
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1935420
    notification_emails:
      - webrtc-telemetry-alerts@mozilla.com
    expires: never
    telemetry_mirror: WEBRTC_GET_USER_MEDIA_TYPE

  renegotiations:
    type: custom_distribution
    description: >
      Number of Renegotiations during each call

      This metric was generated to correspond to the Legacy Telemetry linear
      histogram WEBRTC_RENEGOTIATIONS.
    range_min: 1
    range_max: 21
    bucket_count: 20
    histogram_type: linear
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1935420
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1935420
    notification_emails:
      - webrtc-telemetry-alerts@mozilla.com
    expires: never
    telemetry_mirror: WEBRTC_RENEGOTIATIONS

  max_video_send_track:
    type: custom_distribution
    description: >
      Number of Video tracks sent simultaneously

      This metric was generated to correspond to the Legacy Telemetry linear
      histogram WEBRTC_MAX_VIDEO_SEND_TRACK.
    range_min: 1
    range_max: 10
    bucket_count: 9
    histogram_type: linear
    unit: video tracks
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1935420
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1935420
    notification_emails:
      - webrtc-telemetry-alerts@mozilla.com
    expires: never
    telemetry_mirror: WEBRTC_MAX_VIDEO_SEND_TRACK

  max_video_receive_track:
    type: custom_distribution
    description: >
      Number of Video tracks received simultaneously

      This metric was generated to correspond to the Legacy Telemetry linear
      histogram WEBRTC_MAX_VIDEO_RECEIVE_TRACK.
    range_min: 1
    range_max: 20
    bucket_count: 19
    histogram_type: linear
    unit: video tracks
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1935420
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1935420
    notification_emails:
      - webrtc-telemetry-alerts@mozilla.com
    expires: never
    telemetry_mirror: WEBRTC_MAX_VIDEO_RECEIVE_TRACK

  max_audio_send_track:
    type: custom_distribution
    description: >
      Number of Audio tracks sent simultaneously

      This metric was generated to correspond to the Legacy Telemetry linear
      histogram WEBRTC_MAX_AUDIO_SEND_TRACK.
    range_min: 1
    range_max: 20
    bucket_count: 19
    histogram_type: linear
    unit: audio tracks
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1935420
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1935420
    notification_emails:
      - webrtc-telemetry-alerts@mozilla.com
    expires: never
    telemetry_mirror: WEBRTC_MAX_AUDIO_SEND_TRACK

  max_audio_receive_track:
    type: custom_distribution
    description: >
      Number of Audio tracks received simultaneously

      This metric was generated to correspond to the Legacy Telemetry linear
      histogram WEBRTC_MAX_AUDIO_RECEIVE_TRACK.
    range_min: 1
    range_max: 30
    bucket_count: 29
    histogram_type: linear
    unit: audio tracks
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1935420
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1935420
    notification_emails:
      - webrtc-telemetry-alerts@mozilla.com
    expires: never
    telemetry_mirror: WEBRTC_MAX_AUDIO_RECEIVE_TRACK

  datachannel_negotiated:
    type: labeled_counter
    description: >
      Was DataChannels negotiated

      This metric was generated to correspond to the Legacy Telemetry boolean
      histogram WEBRTC_DATACHANNEL_NEGOTIATED.
    labels:
      - "false"
      - "true"
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1935420
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1935420
    notification_emails:
      - webrtc-telemetry-alerts@mozilla.com
    expires: never
    telemetry_mirror: h#WEBRTC_DATACHANNEL_NEGOTIATED

  call_type:
    type: custom_distribution
    description: >
      Type of call: (Bitmask) Audio = 1, Video = 2, DataChannels = 4

      This metric was generated to correspond to the Legacy Telemetry enumerated
      histogram WEBRTC_CALL_TYPE.
    range_min: 0
    range_max: 8
    bucket_count: 9
    histogram_type: linear
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1935420
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1935420
    notification_emails:
      - webrtc-telemetry-alerts@mozilla.com
    expires: never
    telemetry_mirror: WEBRTC_CALL_TYPE

  software_h264_enabled:
    type: labeled_counter
    description: >
      Whether hardware H264 is enabled

      This metric was generated to correspond to the Legacy Telemetry boolean
      histogram WEBRTC_SOFTWARE_H264_ENABLED.
    labels:
      - "false"
      - "true"
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1766509
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1766509
    notification_emails:
      - webrtc-telemetry-alerts@mozilla.com
    expires: never
    telemetry_mirror: h#WEBRTC_SOFTWARE_H264_ENABLED

  has_h264_hardware:
    type: labeled_counter
    description: >
      Whether the user has H264 hardware

      This metric was generated to correspond to the Legacy Telemetry boolean
      histogram WEBRTC_HAS_H264_HARDWARE.
    labels:
      - "false"
      - "true"
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1766509
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1766509
    notification_emails:
      - webrtc-telemetry-alerts@mozilla.com
    expires: never
    telemetry_mirror: h#WEBRTC_HAS_H264_HARDWARE

  hardware_h264_enabled:
    type: labeled_counter
    description: >
      Whether software H264 is enabled

      This metric was generated to correspond to the Legacy Telemetry boolean
      histogram WEBRTC_HARDWARE_H264_ENABLED.
    labels:
      - "false"
      - "true"
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1766509
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1766509
    notification_emails:
      - webrtc-telemetry-alerts@mozilla.com
    expires: never
    telemetry_mirror: h#WEBRTC_HARDWARE_H264_ENABLED

  h264_enabled:
    type: labeled_counter
    description: >
      Whether any kind of H264 is enabled

      This metric was generated to correspond to the Legacy Telemetry boolean
      histogram WEBRTC_H264_ENABLED.
    labels:
      - "false"
      - "true"
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1766509
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1766509
    notification_emails:
      - webrtc-telemetry-alerts@mozilla.com
    expires: never
    telemetry_mirror: h#WEBRTC_H264_ENABLED

  gmp_init_success:
    type: labeled_counter
    description: >
      Counts of GMP codec initialization success and failure

      This metric was generated to correspond to the Legacy Telemetry boolean
      histogram WEBRTC_GMP_INIT_SUCCESS.
    labels:
      - "false"
      - "true"
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1774222
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1774222
    notification_emails:
      - webrtc-telemetry-alerts@mozilla.com
    expires: never
    telemetry_mirror: h#WEBRTC_GMP_INIT_SUCCESS
