chromium/tools/metrics/histograms/metadata/nearby/histograms.xml

<!--
Copyright 2021 The Chromium Authors
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->

<!--
This file is used to generate a comprehensive list of Nearby histograms
along with a detailed description for each histogram.

For best practices on writing histogram descriptions, see
https://chromium.googlesource.com/chromium/src.git/+/HEAD/tools/metrics/histograms/README.md

Please follow the instructions in the OWNERS file in this directory to find a
reviewer. If no OWNERS file exists, please consider signing up at
go/reviewing-metrics (Googlers only), as all subdirectories are expected to
have an OWNERS file. As a last resort you can send the CL to
[email protected].
-->

<histogram-configuration>

<histograms>

<variants name="TransferMediums">
  <variant name="" summary="all transfer mediums"/>
  <variant name=".Bluetooth" summary="Bluetooth"/>
  <variant name=".WebRtc" summary="WebRTC"/>
  <variant name=".WifiDirect" summary="Wi-Fi Direct"/>
  <variant name=".WifiLan" summary="Wi-Fi LAN"/>
</variants>

<histogram name="Nearby.BluetoothAdapter.AdvertisingSupport"
    enum="NearbyBluetoothAdapterAdvertisingSupport" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the advertising support for the local Bluetooth Adapter. Emitted
    when the Nearby utility process is started and the Bluetooth Adapter is
    getting ready to be passed as a dependency; only emitted if Bluetooth is
    supported.
  </summary>
</histogram>

<histogram name="Nearby.Connections.BleV2.ConnectToGattServer.Duration"
    units="ms" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the duration of successfully connecting to a remote GATT server.
    Emitted when the local ChromeOS device is in the GATT client role, and has
    discovered a remote device via scanning to connect to; this occurs during
    the BLE V2 scanning flow. No metric is emitted on failures.
  </summary>
</histogram>

<histogram name="Nearby.Connections.BleV2.ConnectToGattServer.FailureReason"
    enum="NearbyConnectionsConnectResult" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the error code of a failure connecting to a remote GATT server.
    Emitted when the local ChromeOS device is in the GATT client role, and has
    discovered a remote device via scanning to connect to; this occurs during
    the BLE V2 scanning flow. Note: because this metric is solely about failure
    reason, there are no metrics expected to be emitted to the Success bucket.
  </summary>
</histogram>

<histogram name="Nearby.Connections.BleV2.ConnectToGattServer.Result"
    enum="BooleanSuccess" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the success or failure of connecting to a remote GATT server.
    Emitted when the local ChromeOS device is in the GATT client role, and has
    discovered a remote device via scanning to connect to; this occurs during
    the BLE V2 scanning flow.
  </summary>
</histogram>

<histogram
    name="Nearby.Connections.BleV2.GattClient.ReadCharacteristic.Duration"
    units="ms" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the success or failure of reading a GATT characteristic from a
    remote GATT server once a GATT connection has been established. Emitted when
    the local ChromeOS device has established a GATT connection with the remote
    device during the BLE V2 scanning flow and is attempting to read data from
    the remote device's GATT server. Records the duration of successfully
    reading a GATT characteristic from a remote GATT server once a GATT
    connection has been established. No metric is emitted on failures.
  </summary>
</histogram>

<histogram
    name="Nearby.Connections.BleV2.GattClient.ReadCharacteristic.FailureReason"
    enum="NearbyConnectionsGattResult" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the error code of a failure of reading a GATT characteristic from a
    remote GATT server once a GATT connection has been established. Emitted when
    the local ChromeOS device has established a GATT connection with the remote
    device during the BLE V2 scanning flow and is attempting to read data from
    the remote device's GATT server. This metrics tracks the failure reason of
    the Bluetooth layer read attempt, and does not capture other failure reasons
    like if the characteristic or service uuid is not already known to the GATT
    client. Note: because this metric is solely about failure reason, there are
    no metrics expected to be emitted to the Success bucket.
  </summary>
</histogram>

<histogram name="Nearby.Connections.BleV2.GattClient.ReadCharacteristic.Result"
    enum="BooleanSuccess" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the success or failure of reading a GATT characteristic from a
    remote GATT server once a GATT connection has been established. Emitted when
    the local ChromeOS device has established a GATT connection with the remote
    device during the BLE V2 scanning flow and is attempting to read data from
    the remote device's GATT server.
  </summary>
</histogram>

<histogram
    name="Nearby.Connections.BleV2.GattServer.CreateCharacteristic.Result"
    enum="BooleanSuccess" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the success or failure of creating a local GATT characteristic once
    a GATT service hosting the characteristic is already successfully created.
    Emitted on calls by Nearby Connections to create a GATT characteristic
    before advertising begins; the GATT server first creates a GATT service if
    one doesn't exist already before creating the characteristic, and this
    metric captures the success/failure of creating the GATT characteristic.
    Note that this metric is only about the creating of a characteristic, and
    does not include any metrics about if the method CreateCharacteristic() is
    called and the characteristic is already created.
  </summary>
</histogram>

<histogram
    name="Nearby.Connections.BleV2.GattServer.CreateLocalGattService.Result"
    enum="BooleanSuccess" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the success or failure of creating a local GATT service. Emitted on
    calls by Nearby Connections to create a GATT characteristic before
    advertising begins; the GATT server first creates a GATT service if one
    doesn't exist already before creating the characteristic, and this metric
    captures the success/failure of creating the GATT service.
  </summary>
</histogram>

<histogram
    name="Nearby.Connections.BleV2.GattServer.OnLocalCharacteristicRead.Result"
    enum="BooleanSuccess" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the success or failure of a read requested by a remote GATT client
    on the GATT server. Emitted during the advertising flow of BLE V2 after the
    GATT service and characteristic have been set up, the characteristic value
    has been set, and after an advertisement has been sent; a remote GATT client
    sees the advertisement, connects to the GATT server, and attempts to read
    the value.
  </summary>
</histogram>

<histogram
    name="Nearby.Connections.BleV2.GattServer.RegisterGattService.FailureReason"
    enum="BluetoothGattServiceGattErrorCode" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the failure reason for registering a single GATT service. Emitted
    when registration of the GATT services is triggered by BLE V2 Medium when
    advertising is requested; BLE V2 Medium attempts to register the GATT
    services before advertising.
  </summary>
</histogram>

<histogram
    name="Nearby.Connections.BleV2.GattServer.RegisterGattServices.Result"
    enum="BooleanSuccess" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the success or failure of registering all of the GATT Services that
    are part of the BLE V2 GATT Server. Success is indicating by the success of
    registering all of the GATT services with the local Bluetooth Adapter, which
    makes all the service data and characteristics available. Failure is
    indicated by any one GATT service failing to be registered - see metric
    &quot;Nearby.Connections.BleV2.GattServer.RegisterGattService.ErrorReason&quot;
    for insights on the failure reasons. Emitted when registration of the GATT
    services is triggered by BLE V2 Medium when advertising is requested; BLE V2
    Medium attempts to register the GATT services before advertising, and only
    begins advertising on success.
  </summary>
</histogram>

<histogram
    name="Nearby.Connections.BleV2.GattServer.UpdateCharacteristic.Result"
    enum="BooleanSuccess" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the success or failure of updating the value of a local GATT
    characteristic, which entails storing the value of the characteristic for
    future read requests. Emitted during the BLE V2 advertising flow after a
    GATT service and GATT characteristic are created successfully, and before
    advertising is started by Nearby Connections. Possible failure reasons are
    that the requested GATT service or GATT characteristic called on the API do
    not exist at the time of the call unexpectedly.
  </summary>
</histogram>

<histogram name="Nearby.Connections.BleV2.ScatternetDualRoleSupported"
    enum="Boolean" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records whether or not the local ChromeOS device supports the Scatternet
    Dual Role which is used to decide to start a GATT server. Emitted after a
    check on the local Bluetooth Adapter for supported roles when Nearby
    Connections is deciding to start a GATT server when it begins BLE V2
    advertising.
  </summary>
</histogram>

<histogram
    name="Nearby.Connections.BleV2.StartAdvertising.FailureReason{AdvertisementType}"
    enum="NearbyConnectionsStartAdvertisingFailureReason"
    expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the failure reason of the StartAdvertising operation, which is
    called several times by Nearby Connections when the device becomes available
    for advertising. Advertisements come in different varieties, and we record 2
    different variants; those that make use of &quot;extended
    advertisements&quot; which are up to 255 bytes long, and shorter
    &quot;regular advertisements&quot;.
  </summary>
  <token key="AdvertisementType">
    <variant name="" summary="both regular and extended advertisements"/>
    <variant name=".ExtendedAdvertisement" summary="extended advertisement"/>
    <variant name=".RegularAdvertisement" summary="regular advertisement"/>
  </token>
</histogram>

<histogram
    name="Nearby.Connections.BleV2.StartAdvertising.Result{AdvertisementType}"
    enum="BooleanSuccess" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the success or failure of the StartAdvertising operation, which is
    called several times by Nearby Connections when the device becomes available
    for advertising. Advertisements come in different varieties, and we record 2
    different variants; those that make use of &quot;extended
    advertisements&quot; which are up to 255 bytes long, and shorter
    &quot;regular advertisements&quot;.
  </summary>
  <token key="AdvertisementType">
    <variant name="" summary="both regular and extended advertisements"/>
    <variant name=".ExtendedAdvertisement" summary="extended advertisement"/>
    <variant name=".RegularAdvertisement" summary="regular advertisement"/>
  </token>
</histogram>

<histogram name="Nearby.Connections.BleV2.StartScanning.FailureReason"
    enum="NearbyConnectionsStartScanningFailureReason"
    expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the failure reason of the StartScanning operation, which is called
    by Nearby Connections when the device becomes available for scanning.
    Emitted only on failure.
  </summary>
</histogram>

<histogram name="Nearby.Connections.BleV2.StartScanning.Result"
    enum="BooleanSuccess" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the success or failure of the StartScanning operation, which is
    called by Nearby Connections when the device becomes available for scanning.
  </summary>
</histogram>

<histogram name="Nearby.Connections.Bluetooth.Adapter.SetName.Result"
    enum="BooleanSuccess" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records whether the request to set the adapter's name has succeeded. Emitted
    when the request succeeds or fails.
  </summary>
</histogram>

<histogram name="Nearby.Connections.Bluetooth.Adapter.SetScanMode.Result"
    enum="BooleanSuccess" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records whether the request to set the adapter's scan mode has succeeded.
    Emitted when the request succeeds or fails.
  </summary>
</histogram>

<histogram
    name="Nearby.Connections.Bluetooth.ClassicMedium.ConnectToService.Duration"
    units="ms" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records time spent in milliseconds to establish a Bluetooth service
    connection successfully.
  </summary>
</histogram>

<histogram name="Nearby.Connections.Bluetooth.ClassicMedium.{Operation}.Result"
    enum="BooleanSuccess" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>Records the result of {Operation}.</summary>
  <token key="Operation">
    <variant name="ConnectToService" summary="connecting to Bluetooth service"/>
    <variant name="ListenForService" summary="listening for Bluetooth service"/>
    <variant name="StartDiscovery" summary="initiating a discovery process"/>
    <variant name="StopDiscovery" summary="stopping discovery"/>
  </token>
</histogram>

<histogram name="Nearby.Connections.Bluetooth.LEMedium.StartAdvertising.Result"
    enum="BooleanSuccess" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records whether the request to start advertising has succeeded.
  </summary>
</histogram>

<histogram name="Nearby.Connections.Bluetooth.LEMedium.StartScanning.Result"
    enum="BooleanSuccess" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records whether BLE scanning has been initiated successfully.
  </summary>
</histogram>

<histogram name="Nearby.Connections.Bluetooth.LEMedium.StopAdvertising.Result"
    enum="BooleanSuccess" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records whether the request to stop advertising has succeeded.
  </summary>
</histogram>

<histogram name="Nearby.Connections.Bluetooth.LEMedium.StopScanning.Result"
    enum="BooleanSuccess" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>Records whether BLE scanning has been stopped successfully.</summary>
</histogram>

<histogram
    name="Nearby.Connections.InstantMessaging.ReceiveExpress.NumParsingAttempts"
    units="attempts" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the number of parsing attempts it takes the stream parser to check
    byte by byte if the data it received forms a valid StreamBody proto. Emitted
    every time we get a receive-express HTTP response from the Instant Messaging
    API.
  </summary>
</histogram>

<histogram
    name="Nearby.Connections.InstantMessaging.TachyonIceConfigFetcher.CacheHit"
    enum="BooleanCacheHit" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records whether the cache was used to satisfy the GetIceServers request.
    Emitted when GetIceServers is called.
  </summary>
</histogram>

<histogram
    name="Nearby.Connections.InstantMessaging.TachyonIceConfigFetcher.FailureReason"
    enum="CombinedHttpResponseAndNetErrorCode" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the HTTP response code or net error code of the GetIceServers API
    call to the Tachyon server. Emitted only on failure or timeout.
  </summary>
</histogram>

<histogram
    name="Nearby.Connections.InstantMessaging.TachyonIceConfigFetcher.OAuthTokenFetchResult"
    enum="BooleanSuccess" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records whether the Tachyon OAuth token was successfully fetched. Emitted
    when the token fetcher request returns.
  </summary>
</histogram>

<histogram
    name="Nearby.Connections.InstantMessaging.TachyonIceConfigFetcher.Result"
    enum="BooleanSuccess" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the result of the GetIceServers API call to the Tachyon server.
    Emitted when the http response is received or when the call times out.
  </summary>
</histogram>

<histogram
    name="Nearby.Connections.InstantMessaging.{Direction}Express.OAuthTokenFetchResult"
    enum="BooleanSuccess" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records whether or not the user was able to fetch the OAuth token necessary
    to {Direction} the Instant Messaging API. Emitted at the conclusion of the
    token request, which is attempted right before making HTTPS requests to the
    Instant Messaging API.
  </summary>
  <token key="Direction">
    <variant name="Receive" summary="start receiving messages from"/>
    <variant name="Send" summary="send a message to"/>
  </token>
</histogram>

<histogram name="Nearby.Connections.InstantMessaging.{Direction}Express.Result"
    enum="BooleanSuccess" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records whether an HTTPS call to {Direction} the Instant Messaging API
    succeeds or fails. Emitted when the HTTPS call succeeds or fails.
  </summary>
  <token key="Direction">
    <variant name="Receive" summary="start receiving messages from"/>
    <variant name="Send" summary="send a message to"/>
  </token>
</histogram>

<histogram
    name="Nearby.Connections.InstantMessaging.{Direction}Express.Result.FailureReason"
    enum="CombinedHttpResponseAndNetErrorCode" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the network error code or HTTPS response code from a failed HTTPS
    call to {Direction} the Instant Messaging API. Emitted when the HTTPS call
    fails.
  </summary>
  <token key="Direction">
    <variant name="Receive" summary="start receiving messages from"/>
    <variant name="Send" summary="send a message to"/>
  </token>
</histogram>

<histogram name="Nearby.Connections.UtilityProcessShutdownReason"
    enum="NearbyConnectionsUtilityProcessShutdownReason"
    expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records why the Sharing utility process, which hosts Nearby Connections, was
    shut down: for an expected reason (i.e., shut down request from a client),
    or another unexpected reason (e.g., a crash).
  </summary>
</histogram>

<histogram
    name="Nearby.Connections.UtilityProcessShutdownReason.DisconnectedMojoDependency"
    enum="NearbyConnectionsUtilityProcessMojoDependencyName"
    expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records which Mojo dependency of the Sharing utility process disconnected
    from the browser process. This will not necessarily line up with the counts
    in the Mojo disconnect bucket of
    Nearby.Connections.UtilityProcessShutdownReason which tracks disconnects on
    the utility process side.
  </summary>
</histogram>

<histogram name="Nearby.Connections.V3.Connection.Result"
    enum="NearbyConnectionsStatus" expires_after="2025-05-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the result upon completing an attempt to connect to a remote device
    with the V3 connection flow. Emitted when receiving the result from the
    Nearby utility process.
  </summary>
</histogram>

<histogram name="Nearby.Connections.V3.ConnectionResult.Success.Latency"
    units="ms" expires_after="2025-05-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the time spent in milliseconds to receive a NearbyConnection socket
    after starting a Connect V3 to a remote device. Emitted when the connection
    is successfully created.
  </summary>
</histogram>

<histogram name="Nearby.Connections.V3.Medium.ChangedToMedium"
    enum="NearbyConnectionsMedium" expires_after="2025-05-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the data-transfer medium that the Nearby Connections library
    successfully switches to for V3 connections. Emitted when the Nearby
    Connections library notifies of a bandwidth upgrade.
  </summary>
</histogram>

<histogram name="Nearby.Connections.WifiDirect.AssociateSocket.Result"
    enum="BooleanSuccess" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records if the socket was able to be associated with the WiFi Direct
    interface. Emitted when both connecting and listening for Nearby
    Connections.
  </summary>
</histogram>

<histogram name="Nearby.Connections.WifiDirect.ConnectToService.Error"
    enum="NearbyConnectionsWifiDirectServiceError" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the error that occured attempting to connect to the Nearby
    Connections endpoint via the connected WiFi Direct interface. Emitted when
    Nearby Connections encounters an error initiating the TCP connection.
  </summary>
</histogram>

<histogram name="Nearby.Connections.WifiDirect.ConnectToService.Result"
    enum="BooleanSuccess" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the result of attempting to connect to the Nearby onnections
    endpoint via the connected WiFi Direct interface. Emitted when Nearby
    Connections returns the result from connect to service call.
  </summary>
</histogram>

<histogram name="Nearby.Connections.WifiDirect.ConnectToWifiDirectGroup.Error"
    enum="NearbyConnectionsWifiDirectResult" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the error that occured when a connection to an external WiFi Direct
    group was attempted. Emitted when Nearby Connections returns the result from
    the mojo call to connect the GC.
  </summary>
</histogram>

<histogram name="Nearby.Connections.WifiDirect.ConnectToWifiDirectGroup.Result"
    enum="BooleanSuccess" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records if the WiFi Direct group was able to be connected to. Emitted when
    Nearby Connections returns the result from the mojo call to connect the GC.
  </summary>
</histogram>

<histogram name="Nearby.Connections.WifiDirect.CreateWifiDirectGroup.Error"
    enum="NearbyConnectionsWifiDirectResult" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the error that occured when the WiFi Direct group creation was
    attempted. Emitted when Nearby Connections returns the result from the mojo
    call to create the GO.
  </summary>
</histogram>

<histogram name="Nearby.Connections.WifiDirect.CreateWifiDirectGroup.Result"
    enum="BooleanSuccess" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records if the WiFi Direct group was able to be created. Emitted when Nearby
    Connections returns the result from the mojo call to create the GO.
  </summary>
</histogram>

<histogram name="Nearby.Connections.WifiDirect.IsP2pSupported" enum="Boolean"
    expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records if the WiFi Direct interface currently supports P2P. If P2P support
    is true, it indicates that the interface is valid and ready to use. Emitted
    when Nearby Connections initiates a bandwidth upgrade and checks for
    available transfer mediums.
  </summary>
</histogram>

<histogram name="Nearby.Connections.WifiDirect.ListenForService.Error"
    enum="NearbyConnectionsWifiDirectServiceError" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the error that occured attempting to listen for new Nearby
    Connections via the connected WiFi Direct interface. Emitted when Nearby
    Connections encounters an error setting up the the TCP server socket.
  </summary>
</histogram>

<histogram name="Nearby.Connections.WifiDirect.ListenForService.Result"
    enum="BooleanSuccess" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the result of attempting to listen for new Nearby Connections via
    the connected WiFi Direct interface. Emitted when Nearby Connections returns
    the result from listen for service call.
  </summary>
</histogram>

<histogram name="Nearby.Connections.WifiDirect.ServerSocket.Accept.Error"
    enum="NearbyConnectionsWifiDirectSocketError" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the error that occured attempting to accept a new Nearby Connection
    via TCP socket on the connected WiFi Direct interface. Emitted when Nearby
    Connections encounters an error accepting a connection on the TCP server
    socket. Cancellations and socket closures do not emit errors because they
    are expected final states.
  </summary>
</histogram>

<histogram name="Nearby.Connections.WifiDirect.ServerSocket.Accept.Result"
    enum="BooleanSuccess" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the result of attempting to accept a new Nearby Connection via TCP
    socket on the connected WiFi Direct interface. Accept is called once during
    the initial upgrade process, and again after each incoming connection has
    been handled. Additionally, a negative value is logged for cancellations and
    socket closure. This means that each successful WiFi Direct transfer will
    have both a successful accept result and a failure due to the closing down
    of the socket when the medium is destructed.
  </summary>
</histogram>

<histogram name="Nearby.Connections.WifiDirect.Socket.Read.Result"
    enum="BooleanSuccess" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the result of attempting to read bytes from a connected TCP socket
    on a connected WiFi Direct medium. Read is called repeatedly during the
    duration of a connection.
  </summary>
</histogram>

<histogram name="Nearby.Connections.WifiDirect.Socket.Write.Result"
    enum="BooleanSuccess" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the result of attempting to write bytes to a connected TCP socket on
    a connected WiFi Direct medium. Write is called repeatedly during the
    duration of a connection.
  </summary>
</histogram>

<histogram name="Nearby.Connections.WifiLan.ConnectResult"
    enum="NearbyConnectionsWifiLanConnectResult" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the result of trying to connect to another device's TCP server
    socket. Emitted after a cross-device connection attempts to be established
    over TCP sockets. Note: One device listens for incoming connections while
    the other device tries to connect. This metric is logged by the connecting
    device.
  </summary>
</histogram>

<histogram name="Nearby.Connections.WifiLan.ListenResult"
    enum="NearbyConnectionsWifiLanListenResult" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the result of listening for and accepting incoming TCP socket
    connections. Emitted after a cross-device connection attempts to be
    established over TCP sockets. Note: One device listens for incoming
    connections while the other device tries to connect. This metric is logged
    by the listening device.
  </summary>
</histogram>

<histogram name="Nearby.Connections.WifiLan.Socket.AcceptResult"
    enum="NetErrorCodes" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the result of a TCP server socket accepting incoming connections.
    This is a lower-level metric that tracks the result code from the TCP server
    socket accept call made in the networking layer. Emitted after a
    cross-device connection attempts to be established over TCP sockets. Note:
    Only one device opens a server socket, which the other device attempts to
    connect to.
  </summary>
</histogram>

<histogram name="Nearby.Connections.WifiLan.TimeToConnect" units="ms"
    expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the time it takes to successfully connect to another device's TCP
    server socket. Emitted after a cross-device connection is established over
    TCP sockets. Not emitted on failure.
  </summary>
</histogram>

<histogram name="Nearby.Connections.{Medium}.Socket.{Operation}.Result"
    enum="BooleanSuccess" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records success or failure when {Operation} of a {Medium} socket. Emitted
    during cross-device data transfers.
  </summary>
  <token key="Medium">
    <variant name="Bluetooth" summary="Bluetooth"/>
    <variant name="WifiLan" summary="WifiLan TCP"/>
  </token>
  <token key="Operation">
    <variant name="Read" summary="reading from the input stream"/>
    <variant name="Write" summary="writing to the output stream"/>
  </token>
</histogram>

<histogram name="Nearby.Presence.Credentials.Download.AttemptsNeededCount"
    units="attempts" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the total number of attempts of downloading the remote devices'
    SharedCredentials from the Nearby Presence Web Server needed for a
    successful download. Emitted on success to reflect the final count of
    attempts required to download credentials from the server. No metric is
    emitted on failure.
  </summary>
</histogram>

<histogram name="Nearby.Presence.Credentials.Download.FailureReason"
    enum="NearbyHttpResult" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the failure reason of a single attempt to download the remote
    devices' SharedCredentials from the Nearby Presence Web Server. Emitted
    after every unsuccessful attempt to download credentials from the server. No
    metric is emitted on success.
  </summary>
</histogram>

<histogram name="Nearby.Presence.Credentials.Download.Result"
    enum="BooleanSuccess" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the overall success or failure of downloading the remote devices'
    SharedCredentials from the Nearby Presence Web Server. Emitted after all
    retries to download from the server have been completed, to reflect the
    final result of downloading credentials from the server.
  </summary>
</histogram>

<histogram name="Nearby.Presence.Credentials.Download.ServerRequestDuration"
    units="ms" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records time spent in milliseconds to receive a response from the Nearby
    Presence Web Server after a download request for remote devices'
    credentials. Emitted after a successful response from the server. Note that
    there is a timeout at 5 seconds.
  </summary>
</histogram>

<histogram name="Nearby.Presence.Credentials.FirstTimeRegistration.Result"
    enum="NearbyPresenceFirstTimeRegistrationResult" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the result (success or failure reason) of the first time server
    registration flow for Nearby Presence. The first time server registration
    flow occurs only once per user per device. Emitted on failure or success of
    the overall flow.
  </summary>
</histogram>

<histogram
    name="Nearby.Presence.Credentials.FirstTimeServerRegistration.AttemptsNeededCount"
    units="attempts" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the total number of attempts of registering the local device with
    the Nearby Presence Web Server during the first time registration flow. The
    first time server registration flow occurs only once per user per device.
    Emitted on success to reflect the final count of attempts required to
    register with the server. No metric is emitted on failure.
  </summary>
</histogram>

<histogram
    name="Nearby.Presence.Credentials.FirstTimeServerRegistration.FailureReason"
    enum="NearbyHttpResult" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the failure reason of a single attempt to register the local device
    with the Nearby Presence Web Server. The first time server registration flow
    occurs only once per user per device. Emitted after every unsuccessful
    attempt to register with the server. No metric is emitted on success.
  </summary>
</histogram>

<histogram
    name="Nearby.Presence.Credentials.FirstTimeServerRegistration.ServerRequestDuration"
    units="ms" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records time spent in milliseconds to receive a response from the Nearby
    Presence Web Server after an upload request during first time server
    registration. Emitted after a successful response from the server. Note that
    there is a timeout at 5 seconds.
  </summary>
</histogram>

<histogram name="Nearby.Presence.Credentials.Storage.Initialization.Result"
    enum="BooleanSuccess" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the overall result of initialization of the Nearby Presence
    Credential Storage component. Emitted after the initialization attempt
    completes.
  </summary>
</histogram>

<histogram
    name="Nearby.Presence.Credentials.Storage.LocalPublicDatabaseInitializationDuration"
    units="microseconds" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records time spent to retrieve local public credentials database in the
    Nearby Presence Credential Storage component. Emitted after a successful
    retrieval from the database. No metric is emitted on failure.

    Note: This is only recorded on devices with high-resolution clocks.
  </summary>
</histogram>

<histogram
    name="Nearby.Presence.Credentials.Storage.LocalPublicDatabaseInitializationResult"
    enum="BooleanSuccess" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the result of an initialization attempt of the local public
    credential database in the Nearby Presence Credential Storage component.
    Emitted after an initialization attempt completes.
  </summary>
</histogram>

<histogram
    name="Nearby.Presence.Credentials.Storage.LocalSharedCredentials.Count"
    units="count" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the total number of local shared credentials stored in the local
    shared credential database of the Nearby Presence Credential Storage
    component. Emitted to once each time Nearby Presence is initialized in the
    utility process.
  </summary>
</histogram>

<histogram
    name="Nearby.Presence.Credentials.Storage.LocalSharedCredentials.Size"
    units="KB" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the total size of local shared credentials stored in the local
    shared credential database of the Nearby Presence Credential Storage
    component. Emitted to once each time Nearby Presence is initialized in the
    utility process.
  </summary>
</histogram>

<histogram
    name="Nearby.Presence.Credentials.Storage.PrivateDatabaseInitializationDuration"
    units="microseconds" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records time spent to initialize the private credentials database in the
    Nearby Presence Credential Storage component. Emitted after a successful
    retrieval from the database. No metric is emitted on failure.

    Note: This is only recorded on devices with high-resolution clocks.
  </summary>
</histogram>

<histogram
    name="Nearby.Presence.Credentials.Storage.PrivateDatabaseInitializationResult"
    enum="BooleanSuccess" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the result of an initialization attempt of the private credential
    database in the Nearby Presence Credential Storage component. Emitted after
    an initialization attempt completes.
  </summary>
</histogram>

<histogram
    name="Nearby.Presence.Credentials.Storage.RemotePublicDatabaseInitializationDuration"
    units="microseconds" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records time spent to initialize the remote public credentials database in
    the Nearby Presence Credential Storage component. Emitted after a successful
    retrieval from the database. No metric is emitted on failure.

    Note: This is only recorded on devices with high-resolution clocks.
  </summary>
</histogram>

<histogram
    name="Nearby.Presence.Credentials.Storage.RemotePublicDatabaseInitializationResult"
    enum="BooleanSuccess" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the result of an initialization attempt of the remote public
    credential database in the Nearby Presence Credential Storage component.
    Emitted after an initialization attempt completes.
  </summary>
</histogram>

<histogram
    name="Nearby.Presence.Credentials.Storage.RemoteSharedCredentials.Count"
    units="count" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the total number of remote shared credentials stored in the remote
    shared credential database of the Nearby Presence Credential Storage
    component. Emitted to once each time Nearby Presence is initialized in the
    utility process.
  </summary>
</histogram>

<histogram
    name="Nearby.Presence.Credentials.Storage.RemoteSharedCredentials.Size"
    units="KB" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the total size of remote shared credentials stored in the remote
    shared credential database of the Nearby Presence Credential Storage
    component. Emitted to once each time Nearby Presence is initialized in the
    utility process.
  </summary>
</histogram>

<histogram
    name="Nearby.Presence.Credentials.Storage.RetrieveLocalPublicCredentials.Result"
    enum="BooleanSuccess" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the result of an attempt at retrieving credentials from the local
    public credential database of the Nearby Presence Credential Storage
    component. Emitted after an attempt to retrieve credentials from the local
    public credential database completes.
  </summary>
</histogram>

<histogram
    name="Nearby.Presence.Credentials.Storage.RetrieveLocalPublicCredentialsDuration"
    units="microseconds" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records time spent to retrieve local public credentials from the Nearby
    Presence Credential Storage component. Emitted after a successful retrieval
    from the database. No metric is emitted on failure.

    Note: This is only recorded on devices with high-resolution clocks.
  </summary>
</histogram>

<histogram
    name="Nearby.Presence.Credentials.Storage.RetrievePrivateCredentials.Result"
    enum="BooleanSuccess" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the result of an attempt at retrieving credentials from the private
    credential database of the Nearby Presence Credential Storage component.
    Emitted after an attempt to retrieve credentials from the private credential
    database completes.
  </summary>
</histogram>

<histogram
    name="Nearby.Presence.Credentials.Storage.RetrievePrivateCredentialsDuration"
    units="microseconds" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records time spent to retrieve private credentials from the Nearby Presence
    Credential Storage component. Emitted after a successful retrieval from the
    database. No metric is emitted on failure.

    Note: This is only recorded on devices with high-resolution clocks.
  </summary>
</histogram>

<histogram
    name="Nearby.Presence.Credentials.Storage.RetrieveRemotePublicCredentials.Result"
    enum="BooleanSuccess" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the result of an attempt at retrieving credentials from the remote
    public credential database of the Nearby Presence Credential Storage
    component. Emitted after an attempt to retrieve credentials from the remote
    public credential database completes.
  </summary>
</histogram>

<histogram
    name="Nearby.Presence.Credentials.Storage.RetrieveRemotePublicCredentialsDuration"
    units="microseconds" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records time spent to retrieve remote public credentials from the Nearby
    Presence Credential Storage component. Emitted after a successful retrieval
    from the database. No metric is emitted on failure.

    Note: This is only recorded on devices with high-resolution clocks.
  </summary>
</histogram>

<histogram
    name="Nearby.Presence.Credentials.Storage.SaveLocalPublicCredentials.Result"
    enum="BooleanSuccess" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the result of an attempt at saving credentials to the local public
    credential database of the Nearby Presence Credential Storage component.
    Emitted after an attempt to save credentials to the local public credential
    database completes.
  </summary>
</histogram>

<histogram
    name="Nearby.Presence.Credentials.Storage.SavePrivateCredentials.Result"
    enum="BooleanSuccess" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the result of an attempt at saving credentials to the private
    credential database of the Nearby Presence Credential Storage component.
    Emitted after an attempt to save credentials to the private credential
    database completes.
  </summary>
</histogram>

<histogram
    name="Nearby.Presence.Credentials.Storage.SaveRemotePublicCredentials.Result"
    enum="BooleanSuccess" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the result of an attempt at saving credentials to the remote public
    credential database of the Nearby Presence Credential Storage component.
    Emitted after an attempt to save credentials to the remote public credential
    database completes.
  </summary>
</histogram>

<histogram name="Nearby.Presence.Credentials.Upload.AttemptsNeededCount"
    units="attempts" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the total number of attempts of uploading the local device's
    SharedCredentials to the Nearby Presence Web Server needed for a successful
    upload. Emitted on success to reflect the final count of attempts required
    to upload credentials to the server. No metric is emitted on failure.
  </summary>
</histogram>

<histogram name="Nearby.Presence.Credentials.Upload.FailureReason"
    enum="NearbyHttpResult" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the failure reason of a single attempt to upload the local device's
    SharedCredentials to the Nearby Presence Web Server. Emitted after every
    unsuccessful attempt to upload credentials to the server. No metric is
    emitted on success.
  </summary>
</histogram>

<histogram name="Nearby.Presence.Credentials.Upload.Result"
    enum="BooleanSuccess" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the overall success or failure of uploading the local device's
    SharedCredentials to the Nearby Presence Web Server. Emitted after all
    retries to upload to the server have been completed, to reflect the final
    result of uploading credentials to the server.
  </summary>
</histogram>

<histogram name="Nearby.Presence.Credentials.Upload.ServerRequestDuration"
    units="ms" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records time spent in milliseconds to receive a response from the Nearby
    Presence Web Server after an upload request for the local device's
    credentials. Emitted after a successful response from the server. Note that
    there is a timeout at 5 seconds.
  </summary>
</histogram>

<histogram name="Nearby.Presence.DeviceFound.Latency" units="ms"
    expires_after="2025-05-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records time spent in milliseconds from starting a Presence scan to finding
    a remote device. Emitted when each remote device is found.
  </summary>
</histogram>

<histogram name="Nearby.Presence.Process.Shutdown.Reason"
    enum="NearbyConnectionsUtilityProcessShutdownReason"
    expires_after="2025-05-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records why the Nearby Presence utility process was shutdown, including
    normal, expected shutdowns. Emitted when the utility process is stopped.
  </summary>
</histogram>

<histogram name="Nearby.Presence.ScanRequest.Result"
    enum="NearbyPresenceScanRequestResult" expires_after="2025-05-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the result of starting a scan via Nearby Presence. Emitted when the
    scan request result is received for most cases. A special case occurs if the
    utility process reference is unable to be started; that particular enum is
    instead emitted as soon as the failure to start occurs.
  </summary>
</histogram>

<histogram
    name="Nearby.Share.BackgroundScanning.DeviceNearbySharing.Notification.Flow"
    enum="NearbyShareBackgroundScanningDeviceNearbySharingNotificationFlowEvent"
    expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records each step in the background scanning notification flow if Nearby
    Share onboarding is complete. Emitted after the notification that a nearby
    device is trying to share is shown, and again when the user acts on the
    notification by clicking enable, dismiss or exit. Clicking enable puts the
    user in high-visibility mode.
  </summary>
</histogram>

<histogram
    name="Nearby.Share.BackgroundScanning.DeviceNearbySharing.Notification.TimeToAction"
    units="ms" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records how long it takes for a user to act on a background scanning
    notification if Nearby Share onboarding is complete. Emitted after the user
    acts on the notification by clicking enable, dismiss or exit.
  </summary>
</histogram>

<histogram name="Nearby.Share.BackgroundScanning.DevicesDetected"
    enum="NearbyShareBackgroundScanningDevicesDetectedEvent"
    expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Logs an event when there were previously no devices nearby trying to share
    and now there are nearby devices trying to share. Emitted when the nearby
    devices trying to share changes from zero to greater than zero. A
    notification will not be shown on this event if the user dismissed the
    notification in the last 15 minutes.This metric is not emitted if the
    background scanning feature is disabled.
  </summary>
</histogram>

<histogram name="Nearby.Share.BackgroundScanning.DevicesDetected.Duration"
    units="ms" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records for how long nearby devices were trying to share. Emitted after the
    number of devices trying to share goes from greater than zero to zero. This
    metric is not emitted if the background scanning feature is disabled.
  </summary>
</histogram>

<histogram name="Nearby.Share.BackgroundScanning.SessionStarted"
    enum="BooleanSuccess" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records whether an attempt to start a background scanning session succeeded
    or failed. Emitted after the bluetooth adapter notifies whether starting the
    background scanning session was successfully started. This metric is not
    emitted if the background scanning feature is disabled.
  </summary>
</histogram>

<histogram name="Nearby.Share.BackgroundScanning.Setup.Notification.Flow"
    enum="NearbyShareBackgroundScanningSetupNotificationFlowEvent"
    expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records each step in the background scanning notification flow if Nearby
    Share onboarding is not complete. Emitted after the notification that a
    nearby device is trying to share is shown, and again when the user acts on
    the notification by clicking setup, dismiss or exit. Clicking setup
    initiates Nearby Share onboarding.
  </summary>
</histogram>

<histogram
    name="Nearby.Share.BackgroundScanning.Setup.Notification.TimeToAction"
    units="ms" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records how long it takes for a user to act on a background scanning
    notification if Nearby Share onboarding is not complete. Emitted after the
    user acts on the notification by clicking setup, dismiss or exit.
  </summary>
</histogram>

<histogram
    name="Nearby.Share.Certificates.Manager.BluetoothMacAddressPresentForPrivateCertificateCreation"
    enum="BooleanPresent" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records whether or not a Bluetooth MAC address was able to be fetched during
    the local device's private certificate creation. Emitted after private
    certificates attempt to be created, which typically occurs every three days
    if Nearby Share is enabled. This will only be emitted once if multiple
    certificates are created at a time, for example, when all certificates are
    created after onboarding.
  </summary>
</histogram>

<histogram
    name="Nearby.Share.Certificates.Manager.DownloadPublicCertificatesCount"
    units="certificates" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    If the Nearby Share certificate manager successfully downloads public
    certificates, then record the total number of certificates downloaded across
    all pages.
  </summary>
</histogram>

<histogram
    name="Nearby.Share.Certificates.Manager.DownloadPublicCertificatesFailuePageCount"
    units="pages" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    If the Nearby Share certificate manager fails to download public
    certificates, then record the page number of the page on which the failure
    occurred.
  </summary>
</histogram>

<histogram
    name="Nearby.Share.Certificates.Manager.DownloadPublicCertificatesHttpResult"
    enum="NearbyHttpResult" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the result of the async ListPublicCertificates API call to the
    Nearby Sharing server when the certificate manager periodically downloads
    public certificates. Recorded when the async callback is invoked or when the
    call times out.
  </summary>
</histogram>

<histogram
    name="Nearby.Share.Certificates.Manager.DownloadPublicCertificatesSuccessPageCount"
    units="pages" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    If the Nearby Share certificate manager successfully downloads public
    certificates, then record the number of pages downloaded by the RPC.
  </summary>
</histogram>

<histogram
    name="Nearby.Share.Certificates.Manager.DownloadPublicCertificatesSuccessRate"
    enum="BooleanSuccess" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records whether the Nearby Share certificate manager successfully downloaded
    public certificates from the server and stored them in leveldb.
  </summary>
</histogram>

<histogram
    name="Nearby.Share.Certificates.Manager.GetDecryptedPublicCertificateResult"
    enum="NearbyShareCertificateManagerGetDecryptedPublicCertificateResult"
    expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the result of the async GetDecryptedPublicCertificate call in
    certificate manager.
  </summary>
</histogram>

<histogram name="Nearby.Share.Certificates.Storage.InitializeAttemptCount"
    units="attempts" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    If the Nearby Share certificate storage successfully initializes the public
    certificate database, then record the number of attempts it took.
  </summary>
</histogram>

<histogram name="Nearby.Share.Certificates.Storage.InitializeAttemptResult"
    enum="NearbyShareCertificateStorageInitializationResult"
    expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    For individual initialization attempts of the Nearby Share certificate
    storage public certificate database, record the init status returned by
    leveldb_proto.
  </summary>
</histogram>

<histogram name="Nearby.Share.Certificates.Storage.InitializeSuccessDuration"
    units="ms" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the time necessary to successfully initialize the Nearby Share
    public certificates database. Emitted once after sign-in when the Nearby
    Share service starts.
  </summary>
</histogram>

<histogram name="Nearby.Share.Certificates.Storage.{Operation}SuccessRate"
    enum="BooleanSuccess" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Record success rate of Nearby Share storage operation {Operation}.
  </summary>
  <token key="Operation">
    <variant name="AddPublicCertificates" summary="AddPublicCertificates"/>
    <variant name="Initialize" summary="Initialize"/>
    <variant name="RemoveExpiredPublicCertificates"
        summary="RemoveExpiredPublicCertificates"/>
  </token>
</histogram>

<histogram name="Nearby.Share.Connection.EstablishOutgoingConnection.Success"
    enum="BooleanSuccess" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records whether an attempt to establish a connection to a receiving device
    succeeded or failed; cancellations are ignored. Emitted after the user
    selects a device to send a payload to but before the payload begins its
    transfer. Because the sending device initiates the connection--via the
    Nearby Connections library--this metric is only emitted for outgoing
    transfers.
  </summary>
</histogram>

<histogram name="Nearby.Share.Connection.EstablishOutgoingConnectionStatus"
    enum="NearbyShareFinalStatus" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records whether an attempt to establish a connection to a receiving device
    succeeded, failed, or was cancelled. Emitted after the user selects a device
    to send a payload to but before the payload begins its transfer. Because the
    sending device initiates the connection--via the Nearby Connections
    library--this metric is only emitted for outgoing transfers.
  </summary>
</histogram>

<histogram name="Nearby.Share.Connection.InitialMedium"
    enum="NearbyShareUpgradedMedium" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records what the initial medium is when connection is established, which
    will either be Bluetooth (true in most cases) or Wifi LAN (true only when
    ChromeOS is sending and discovery happens using mDNS). Note that this metric
    is not emitted for receiving Nearby Shares, and Wifi LAN is only supported
    as an initial medium for sending Nearby Shares (as mDNS discovery is
    supported, but advertising isn't).
  </summary>
</histogram>

<histogram name="Nearby.Share.Connection.TimeToEstablishOutgoingConnection"
    units="ms" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the time necessary to successfully establish a connection to a
    receiving device. Emitted after the user selects a device to send a payload
    to but before the payload begins its transfer, and this is only emitted
    after a successful connection is established. Because the sending device
    initiates the connection--via the Nearby Connections library--this metric is
    only emitted for outgoing transfers.
  </summary>
</histogram>

<histogram name="Nearby.Share.Contacts.CanGetProfileUserName"
    enum="BooleanSuccess" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records whether or not we able to retrieve the profile user name--think
    email address--from the Chromebook's profile data. This value is sent to the
    Nearby Share server to allow sharing with other devices logged in with the
    same account. Emitted every time contacts are downloaded for use in Nearby
    Share. Because contacts are not stored locally, contacts are periodically
    downloaded for users with Nearby Share enabled and additionally whenever a
    user enters Nearby Share settings or participates in a sharing flow.
  </summary>
</histogram>

<histogram name="Nearby.Share.Contacts.DownloadPageCount.{Result}"
    units="pages" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Contacts are downloaded in pages, i.e., multiple ListContactPeople RPC
    request/responses. Records the {Result}. Emitted every time contacts are
    downloaded for use in Nearby Share. Because contacts are not stored locally,
    contacts are periodically downloaded for users with Nearby Share enabled and
    additionally whenever a user enters Nearby Share settings or participates in
    a sharing flow.
  </summary>
  <token key="Result">
    <variant name="Failure" summary="page number of the first HTTP failure"/>
    <variant name="Success"
        summary="number of pages needed to download the user's full contact
                 list"/>
  </token>
</histogram>

<histogram name="Nearby.Share.Contacts.DownloadResult" enum="BooleanSuccess"
    expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records whether or not the full, possibly paginated contact download from
    the Nearby server was successful. Emitted every time contacts are downloaded
    for use in Nearby Share. Because contacts are not stored locally, contacts
    are periodically downloaded for users with Nearby Share enabled and
    additionally whenever a user enters Nearby Share settings or participates in
    a sharing flow.
  </summary>
</histogram>

<histogram name="Nearby.Share.Contacts.HttpResult" enum="NearbyHttpResult"
    expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the result of each ListContactPeople RPC call to the Nearby Share
    server. Emitted every time contacts are downloaded for use in Nearby Share.
    Due to pagination, this is emitted for every page of contacts downloaded.
    Because contacts are not stored locally, contacts are periodically
    downloaded for users with Nearby Share enabled and additionally whenever a
    user enters Nearby Share settings or participates in a sharing flow.
  </summary>
</histogram>

<histogram name="Nearby.Share.Contacts.NumContacts.{Type}" units="contacts"
    expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the number of {Type} contacts downloaded from the Nearby server.
    Emitted every time contacts are downloaded for use in Nearby Share. Because
    contacts are not stored locally, contacts are periodically downloaded for
    users with Nearby Share enabled and additionally whenever a user enters
    Nearby Share settings or participates in a sharing flow.
  </summary>
  <token key="Type">
    <variant name="DeviceContactType" summary="device-type"/>
    <variant name="GoogleContactType" summary="Google-type"/>
    <variant name="Reachable" summary="reachable"/>
    <variant name="Selected"
        summary="selected (selected-contacts visibility mode only)"/>
    <variant name="Unfiltered" summary="unfiltered"/>
    <variant name="UnknownContactType" summary="unknown-type"/>
    <variant name="Unreachable" summary="unreachable"/>
  </token>
</histogram>

<histogram name="Nearby.Share.Contacts.Percent{Type}" units="%"
    expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the percentage of {Type} Emitted every time contacts are downloaded
    for use in Nearby Share. Because contacts are not stored locally, contacts
    are periodically downloaded for users with Nearby Share enabled and
    additionally whenever a user enters Nearby Share settings or participates in
    a sharing flow.
  </summary>
  <token key="Type">
    <variant name="DeviceContactType"
        summary="unfiltered contacts that are device-type contacts."/>
    <variant name="Reachable"
        summary="unfiltered contacts that are reachable."/>
    <variant name="Selected"
        summary="(filtered) contacts that are selected by the user in the
                 setting/onboarding UI. Only emitted for users in
                 selected-contacts visibility mode."/>
  </token>
</histogram>

<histogram name="Nearby.Share.Contacts.TimeToDownload.{Result}" units="ms"
    expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the time spent {Result}. Emitted every time contacts are downloaded
    for use in Nearby Share. Because contacts are not stored locally, contacts
    are periodically downloaded for users with Nearby Share enabled and
    additionally whenever a user enters Nearby Share settings or participates in
    a sharing flow.
  </summary>
  <token key="Result">
    <variant name="Failure" summary="downloading contacts before failure"/>
    <variant name="Success"
        summary="to successfully download the user's full contact list"/>
  </token>
</histogram>

<histogram name="Nearby.Share.DeviceType{Direction}"
    enum="NearbyShareDeviceType" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the device type that the user {Direction}. Emitted when a transfer
    completes successfully, fails, or was aborted by the user, for example, by
    cancelling the transfer.
  </summary>
  <token key="Direction">
    <variant name="" summary="sent to or received from"/>
    <variant name=".Receive" summary="received from"/>
    <variant name=".Send" summary="sent to"/>
  </token>
</histogram>

<histogram name="Nearby.Share.Discovery.Delay.FromStartDiscoveryTo{EndState}"
    units="ms" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the delay between the start of the discovery session and {EndState}.
  </summary>
  <token key="EndState">
    <variant name="AnyDiscovery" summary="the discovery of any share target"/>
    <variant name="FirstDiscovery"
        summary="the discovery of the first share target"/>
    <variant name="StartSend" summary="the start of a transfer"/>
  </token>
</histogram>

<histogram name="Nearby.Share.Discovery.FurthestDiscoveryProgress"
    enum="NearbyShareDiscoveryProgress" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the furthest state reached in a single Nearby Share discovery
    session. Emitted when the per-session discovery manager is destroyed.
  </summary>
</histogram>

<histogram name="Nearby.Share.Discovery.LookUpSelectedShareTarget"
    enum="BooleanFound" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records whether or not the selected share target on the Nearby Share
    discovery page can be found in the per-session discovery manager's map of
    discovered share targets. Emitted when the user selects a share target from
    the discovery page and tries to proceed to the next step in the UI.
  </summary>
</histogram>

<histogram name="Nearby.Share.Discovery.NumShareTargets.{Variation}"
    units="share targets" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the number of share targets {Variation} in a single discovery
    session. Emitted once during the discovery session.
  </summary>
  <token key="Variation">
    <variant name="Discovered" summary="discovered"/>
    <variant name="Lost" summary="lost"/>
    <variant name="PresentWhenSendStarts" summary="present when a send starts"/>
  </token>
</histogram>

<histogram name="Nearby.Share.Discovery.{Operation}"
    enum="NearbyShareServiceStatusCode" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the result of {Operation}. Emitted immediately after the operation
    is attempted for each discovery session.
  </summary>
  <token key="Operation">
    <variant name="StartDiscovery" summary="starting a discovery session"/>
    <variant name="StartSend"
        summary="beginning a transfer of an attachment to the selected share
                 target on the discovery page"/>
    <variant name="UnregisterSendSurface"
        summary="unregistering the per-session discovery manager with the
                 Nearby Share service"/>
  </token>
</histogram>

<histogram name="Nearby.Share.Enabled" enum="NearbyShareEnabledState"
    expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records if the user has the Nearby Share feature enabled, and if not,
    records why the feature is not enabled. For example, the feature is not
    allowed by policy, or the user onboarded but later disabled the feature.
    Emitted on sign-in and whenever the feature state changes, for instance,
    from disabled to enabled.
  </summary>
</histogram>

<histogram name="Nearby.Share.EnabledStateChanged" enum="BooleanEnabled"
    expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the enabled/disabled state of Nearby Share. Emitted when the feature
    state changes from disabled to enabled or vice versa. This can happen after
    Nearby Share onboarding or when the user enables/disables the Nearby Share
    feature toggle in Settings.
  </summary>
</histogram>

<histogram name="Nearby.Share.Error" enum="NearbyShareError"
    expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records a unique error code for every site in the code where an error
    condition is recognized.
  </summary>
</histogram>

<histogram name="Nearby.Share.IsKnownContact" enum="BooleanKnown"
    expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records whether or not the device shared with is a known contact, i.e.,
    contact-based sharing. Emitted when a transfer completes successfully,
    fails, or was aborted by the user, for example, by cancelling the transfer.
  </summary>
</histogram>

<histogram name="Nearby.Share.IsSelfShare" enum="BooleanSuccess"
    expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records whether the share was a Self Share. Emitted when Self Share is
    enabled and a transfer completes successfully, fails, or was aborted by the
    user, for example, by cancelling the transfer.
  </summary>
</histogram>

<histogram name="Nearby.Share.LocalDeviceData.DeviceDataUpdater.HttpResult"
    enum="NearbyHttpResult" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the result of the async UpdateDevice API call to the Nearby Sharing
    server when the device data updater makes a request. Recorded when the async
    callback is invoked or when the call times out.
  </summary>
</histogram>

<histogram name="Nearby.Share.Medium.ChangedToMedium"
    enum="NearbyConnectionsMedium" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the data-transfer medium that the Nearby Connections library
    successfully switches to during a Nearby Share transfer. Emitted when the
    Nearby Connections library notifies the client of a bandwidth upgrade.
  </summary>
</histogram>

<histogram name="Nearby.Share.Medium.InitiateBandwidthUpgradeResult"
    enum="BooleanSuccess" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the result of Nearby Share starting a bandwidth upgrade via the
    Nearby Connections library. This metric only records the result of
    initiating the change not the result of fully finishing an upgrade. Also,
    this metric does not capture automatic bandwidth upgrades initiated
    internally by the Nearby Connections library. Emitted when the Nearby
    Connections client explicitly requests a bandwidth upgrade.
  </summary>
</histogram>

<histogram name="Nearby.Share.Medium.RequestedBandwidthUpgradeResult"
    enum="BooleanUpgraded" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records if the transfer medium was successfully upgraded after an explicit
    bandwidth upgrade request from the client. Emitted when the transfer channel
    is disconnected after a bandwidth upgrade request was made by the client.
  </summary>
</histogram>

<histogram name="Nearby.Share.Onboarding.Duration" units="ms"
    expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the time that it took the user to successfully complete the
    onboarding flow. Only emitted on successful completion of onboarding.
  </summary>
</histogram>

<histogram name="Nearby.Share.Onboarding.EntryPoint"
    enum="NearbyShareOnboardingEntryPoint" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records how the user entered the onboarding flow. The options are from OS
    Settings, the tray icon and the share sheet. Emitted as soon as the user
    embarks on the one-time Nearby Share onboarding flow, regardless of whether
    or not they successfully finish.
  </summary>
</histogram>

<histogram name="Nearby.Share.Onboarding.FlowEvent"
    enum="NearbyShareOnboardingFlowEvent" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records how users interacte with the onboarding flow. Emitted when users
    embark the Nearby Share onboarding flow, click buttons during the process.
  </summary>
</histogram>

<histogram name="Nearby.Share.Onboarding.Result"
    enum="NearbyShareOnboardingFinalState" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records how far the user made it through the onboarding flow. The user has
    an option to cancel onboarding on the device name page or visibility page.
    Once the user confirms device visibility onboarding is complete. Emitted
    when the user cancels onboarding during one of the steps or on successful
    completion.
  </summary>
</histogram>

<histogram name="Nearby.Share.Onboarding.{EntryPoint}.Result"
    enum="NearbyShareOnboardingFinalState" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records how far the user, whom entered the onboarding flow via EntryPoint,
    made it through the onboarding flow. Emitted when onboarding is complete or
    the user cancels during one of the steps.
  </summary>
  <token key="EntryPoint">
    <variant name="NearbyDeviceTryingToShareNotification"
        summary="Nearby device trying to share notification"/>
    <variant name="Settings" summary="Settings page"/>
    <variant name="ShareSheet" summary="Share Sheet"/>
    <variant name="Tray" summary="Tray"/>
  </token>
</histogram>

<histogram name="Nearby.Share.PairedKeyVerificationError"
    enum="NearbySharePairedKeyVerificationError" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the reason why paired key verification failed. Emitted whenever the
    PairedKeyVerificationRunner returns kFail.
  </summary>
</histogram>

<histogram name="Nearby.Share.Payload.AttachmentType{Variation}"
    enum="NearbyShareAttachmentType" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the attachment types from {Variation}. Emitted after all attachment
    transfers conclude, successfully or not, for a given share target.
  </summary>
  <token key="Variation">
    <variant name=""
        summary="any Nearby Share attempt, agnostic of final result and
                 direction"/>
    <variant name=".Cancelled" summary="a cancelled Nearby Share attempt"/>
    <variant name=".Failed" summary="a failed Nearby Share attempt"/>
    <variant name=".Receive" summary="an incoming (receive) payload transfer"/>
    <variant name=".Send" summary="an outgoing (send) payload transfer"/>
    <variant name=".Succeeded" summary="a successful Nearby Share attempt"/>
  </token>
</histogram>

<histogram name="Nearby.Share.Payload.FinalStatus{UpgradedMedium}"
    enum="NearbyShareFinalStatus" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records whether a payload transfer succeeded, failed, or was cancelled when
    transmitted over {UpgradedMedium}. Emitted when the payload transfer
    finishes, independent of whether the transfer was successful.
  </summary>
  <token key="UpgradedMedium">
    <variant name="" summary="any medium"/>
    <variant name=".NoMediumUpgrade" summary="the initial bandwidth medium"/>
    <variant name=".UnknownMediumUpgrade"
        summary="an unknown bandwidth-upgraded medium"/>
    <variant name=".WebRtcUpgrade" summary="an upgraded WebRTC medium"/>
    <variant name=".WifiLanUpgrade" summary="an upgraded WifiLan medium"/>
  </token>
</histogram>

<histogram name="Nearby.Share.Payload.Medium" enum="NearbyShareUpgradedMedium"
    expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records if a payload transfer used an upgraded bandwidth medium, and if so,
    which medium. Emitted when the payload transfer finishes, independent of
    whether the transfer was successful.
  </summary>
</histogram>

<histogram
    name="Nearby.Share.Payload.Medium.Over5MbTransferred{ShareTargetType}"
    enum="NearbyShareUpgradedMedium" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records if a payload transfer with {ShareTargetType} used an upgraded
    bandwidth medium, and if so, which medium. Emitted when the payload transfer
    finishes if over 5MB was transferred, independent of whether the transfer
    was successful.
  </summary>
  <token key="ShareTargetType">
    <variant name="" summary="any device type"/>
    <variant name=".Laptop" summary="a laptop"/>
    <variant name=".Phone" summary="a phone"/>
    <variant name=".Tablet" summary="a tablet"/>
    <variant name=".UnknownDeviceType" summary="an unknown device type"/>
  </token>
</histogram>

<histogram name="Nearby.Share.Payload.NumAttachments{Type}" units="attachments"
    expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the number of {Type} attachments intended to be sent in a Nearby
    Share transfer. Emitted when the transfer concludes, successfully or not.
  </summary>
  <token key="Type">
    <variant name="" summary="text, file, or Wi-Fi credentials"/>
    <variant name=".File" summary="file"/>
    <variant name=".Text" summary="text"/>
    <variant name=".WiFiCredentials" summary="Wi-Fi credentials"/>
  </token>
</histogram>

<histogram name="Nearby.Share.Payload.TotalSize{Variation}" units="KB"
    expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the total payload size of a Nearby Share transfer {Variation}.
    Emitted when the transfer concludes.
  </summary>
  <token key="Variation">
    <variant name=""
        summary="for all sharing scenarios, agnostic of final result, device
                 type, or transfer medium"/>
    <variant name=".Cancelled" summary="when the transfer is cancelled"/>
    <variant name=".Failed" summary="when the transfer fails"/>
    <variant name=".Laptop" summary="when sharing with a laptop"/>
    <variant name=".NoMediumUpgrade"
        summary="when using the initial bandwidth medium"/>
    <variant name=".Phone" summary="when sharing with a phone"/>
    <variant name=".Receive" summary="when receiving"/>
    <variant name=".Send" summary="when sending"/>
    <variant name=".Succeeded" summary="when the transfer succeeds"/>
    <variant name=".Tablet" summary="when sharing with a tablet"/>
    <variant name=".UnknownDeviceType"
        summary="when sharing with an unknown device type"/>
    <variant name=".UnknownMediumUpgrade"
        summary="when using an unknown bandwidth-upgraded medium"/>
    <variant name=".WebRtcUpgrade"
        summary="when using an upgraded WebRTC medium"/>
    <variant name=".WifiLanUpgrade"
        summary="when using an upgraded WifiLan medium"/>
  </token>
</histogram>

<histogram name="Nearby.Share.Payload.TransferRate{Variation}" units="KB/s"
    expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the payload transfer rate of a Nearby Share transfer {Variation}.
    Emitted when the transfer concludes.
  </summary>
  <token key="Variation">
    <variant name=""
        summary="for all sharing scenarios, agnostic of final result, device
                 type, or transfer medium"/>
    <variant name=".Cancelled" summary="when the transfer is cancelled"/>
    <variant name=".Failed" summary="when the transfer fails"/>
    <variant name=".Laptop" summary="when sharing with a laptop"/>
    <variant name=".NoMediumUpgrade"
        summary="when using the initial bandwidth medium"/>
    <variant name=".Phone" summary="when sharing with a phone"/>
    <variant name=".Receive" summary="when receiving"/>
    <variant name=".Send" summary="when sending"/>
    <variant name=".Succeeded" summary="when the transfer succeeds"/>
    <variant name=".Tablet" summary="when sharing with a tablet"/>
    <variant name=".UnknownDeviceType"
        summary="when sharing with an unknown device type"/>
    <variant name=".UnknownMediumUpgrade"
        summary="when using an unknown bandwidth-upgraded medium"/>
    <variant name=".WebRtcUpgrade"
        summary="when using an upgraded WebRTC medium"/>
    <variant name=".WifiLanUpgrade"
        summary="when using an upgraded WifiLan medium"/>
  </token>
</histogram>

<histogram
    name="Nearby.Share.Payload.{ContactStatus}.AttachmentType{Variation}"
    enum="NearbyShareAttachmentType" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the attachment types of transfers of trait {Variation} between this
    device and share targets with contact status {ContactStatus}.
  </summary>
  <token key="ContactStatus">
    <variant name="Contact" summary="contact-based sharing"/>
    <variant name="NonContact" summary="non-contact-based sharing"/>
    <variant name="SelfShare" summary="account-based sharing"/>
  </token>
  <token key="Variation">
    <variant name=""
        summary="any Nearby Share attempt, agnostic of final result and
                 direction"/>
    <variant name=".Cancelled" summary="a cancelled Nearby Share attempt"/>
    <variant name=".Failed" summary="a failed Nearby Share attempt"/>
    <variant name=".Received"
        summary="an incoming (receiving) payload transfer"/>
    <variant name=".Sent" summary="an outgoing (sending) payload transfer"/>
    <variant name=".Succeeded" summary="a successful Nearby Share attempt"/>
  </token>
</histogram>

<histogram name="Nearby.Share.Payload{Operation}.Success{FilePath}"
    enum="BooleanSuccess" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the success/failure of a Nearby Share file {Operation} where the
    file path is created within a mount point owned by file manager. Emitted
    when the {Operation} on file(s) from {FilePath} are completed successfully
    or with failure.
  </summary>
  <token key="FilePath">
    <variant name="" summary="any file path"/>
    <variant name=".FuseBox" summary="file path for FuseBox media mount point"/>
    <variant name=".ShareCache" summary="file path for ShareCache mount point"/>
    <variant name=".UnknownPath" summary="file path for unknown mount point"/>
  </token>
  <token key="Operation">
    <variant name=".Open" summary="opening of file for adding to payload"/>
    <variant name=".Read" summary="reading of file from payload"/>
  </token>
</histogram>

<histogram name="Nearby.Share.StartAdvertising.Result.FailureReason{Mode}"
    enum="NearbyShareStartAdvertisingFailureReason" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the reason Nearby Share advertising failed to start in {Mode} mode.
  </summary>
  <token key="Mode">
    <variant name="" summary="All visibility modes"/>
    <variant name=".ContactsVisibility" summary="contacts mode visibility"/>
    <variant name=".HighVisibility" summary="high-visibility"/>
  </token>
</histogram>

<histogram name="Nearby.Share.StartAdvertising.Result{Mode}"
    enum="BooleanSuccess" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the result of starting Nearby Share advertising in {Mode} mode.
  </summary>
  <token key="Mode">
    <variant name="" summary="All visibility modes"/>
    <variant name=".ContactsVisibility" summary="contacts mode visibility"/>
    <variant name=".HighVisibility" summary="high-visibility"/>
  </token>
</histogram>

<histogram name="Nearby.Share.TimeFromInitiateSendToRemoteDeviceNotification"
    units="ms" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the time from initiating a send on a share target to sending the
    introduction frame. This roughly measures the delay between choosing a share
    target to initiate a transfer and displaying the accept/reject notification
    on the receiving device. Emitted after the user selects a device when the
    introduction frame has been sent, and this is only emitted after a
    successful connection is established. This metric is only emitted for
    outgoing transfers.
  </summary>
</histogram>

<histogram name="Nearby.Share.TimeFromLocalAcceptToTransferStart" units="ms"
    expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the time from accepting a share on the receiving device until the
    first payload byte is processed. Emitted after accepting a share when the
    first in progress payload transfer update is received. This metric is only
    emitted for incoming transfers.
  </summary>
</histogram>

<histogram name="Nearby.Share.Transfer.FinalStatus{Variation}"
    enum="NearbyShareTransferFinalStatus" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the final status of a Nearby Share transfer {Variation}. Emitted
    when a transfer completes successfully, fails, or was aborted by the user,
    for example, by cancelling the transfer.
  </summary>
  <token key="Variation">
    <variant name=""
        summary="for all sharing scenarios, agnostic of send/receive, device
                 type, or contact/non-contact"/>
    <variant name=".Contact" summary="when sharing with a contact"/>
    <variant name=".Laptop" summary="when sharing with a laptop"/>
    <variant name=".NonContact" summary="when sharing with a non-contact"/>
    <variant name=".Phone" summary="when sharing with a phone"/>
    <variant name=".Receive" summary="when receiving"/>
    <variant name=".SelfShare"
        summary="when sharing with a device logged into the same account"/>
    <variant name=".Send" summary="when sending"/>
    <variant name=".Tablet" summary="when sharing with a tablet"/>
    <variant name=".UnknownDeviceType"
        summary="when sharing with an unknown device type"/>
  </token>
</histogram>

<histogram name="Nearby.Share.Transfer.Success" enum="BooleanSuccess"
    expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the success/failure of a Nearby Share transfer. Emitted when a
    transfer completes successfully or definitively fails, but not for
    indeterminate states like cancellation.
  </summary>
</histogram>

<histogram
    name="Nearby.Share.Transfer.Success.Receive.{ShareTargetType}.SelfShare.{DeviceState}"
    enum="BooleanSuccess" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the success/failure of a received attachment from a device, logged
    into the same GAIA account as the receiver, of type {ShareTargetType} while
    the receiver is in {DeviceState} state. Emitted when a transfer completes
    successfully or definitively fails, but not for indeterminate states like
    cancellation.
  </summary>
  <token key="ShareTargetType">
    <variant name="Laptop" summary="a laptop"/>
    <variant name="Phone" summary="a phone"/>
    <variant name="Tablet" summary="a tablet"/>
    <variant name="UnknownDeviceType" summary="an unknown device type"/>
  </token>
  <token key="DeviceState">
    <variant name="LoggedIn" summary="device is logged in"/>
    <variant name="ScreenLocked" summary="screen is locked"/>
  </token>
</histogram>

<histogram
    name="Nearby.Share.Transfer.Success.{Direction}.{ShareTargetType}.{ContactStatus}"
    enum="BooleanSuccess" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the success/failure of a Nearby Share {Direction} transfer with
    {ShareTargetType} using {ContactStatus}. Emitted when a transfer completes
    successfully or definitively fails, but not for indeterminate states like
    cancellation.
  </summary>
  <token key="Direction">
    <variant name="Receive" summary="incoming (receive)"/>
    <variant name="Send" summary="outgoing (send)"/>
  </token>
  <token key="ShareTargetType">
    <variant name="Laptop" summary="a laptop"/>
    <variant name="Phone" summary="a phone"/>
    <variant name="Tablet" summary="a tablet"/>
    <variant name="UnknownDeviceType" summary="an unknown device type"/>
  </token>
  <token key="ContactStatus">
    <variant name="Contact" summary="contact-based sharing"/>
    <variant name="NonContact" summary="non-contact-based sharing"/>
    <variant name="SelfShare" summary="account-based sharing"/>
  </token>
</histogram>

<histogram
    name="Nearby.Share.TransferDuration.Receiver.AcceptedTransferToAllFilesReceived"
    units="ms" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the time between when receiver accepts the transfer to when all
    files are successfully transferred.
  </summary>
</histogram>

<histogram
    name="Nearby.Share.TransferDuration.Receiver.BandwidthUpgradeToAllFilesReceived2{TransferMedium}"
    units="ms" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the time between when the first bandwidth upgrade occurs to when all
    files are successfully transferred for {TransferMedium}.
  </summary>
  <token key="TransferMedium" variants="TransferMediums"/>
</histogram>

<histogram
    name="Nearby.Share.TransferDuration.Receiver.EndpointDecodedToReceivedIntroductionFrame"
    units="ms" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the time between when the receiver decodes the incoming endpoint to
    when the introduction frame is received.
  </summary>
</histogram>

<histogram
    name="Nearby.Share.TransferDuration.Receiver.HighVisibilityEndpointDecodedToBandwidthUpgrade2{TransferMedium}"
    units="ms" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the time between when a high-visibility receiver decodes an endpoint
    to when the first bandwidth upgrade occurs for {TransferMedium}. In
    high-visibility mode, the receiver will attempt a bandwidth upgrade
    immediately upon decoding the endpoint.
  </summary>
  <token key="TransferMedium" variants="TransferMediums"/>
</histogram>

<histogram
    name="Nearby.Share.TransferDuration.Receiver.NonHighVisibilityPairedKeyCompleteToBandwidthUpgrade2{TransferMedium}"
    units="ms" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the time between when a non-high-visibility receiver completes the
    paired key handshake to when the first bandwidth upgrade occurs for
    {TransferMedium}. In non-high-visibility mode, the receiver will attempt a
    bandwidth upgrade after a successful paired key handshake. This metric
    captures how long it takes to successfully complete that bandwidth upgrade.
  </summary>
  <token key="TransferMedium" variants="TransferMediums"/>
</histogram>

<histogram
    name="Nearby.Share.TransferDuration.Receiver.ReceivedIntroductionFrameToAllFilesReceived"
    units="ms" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the time between when receiver receives the introduction frame to
    when all files are successfully transferred. Note: This contains user
    interaction so it may vary significantly.
  </summary>
</histogram>

<histogram
    name="Nearby.Share.TransferDuration.Sender.BandwidthUpgradeToAllFilesSent2{TransferMedium}"
    units="ms" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the time between when the first bandwidth upgrade occurs to when all
    files are successfully transferred for {TransferMedium}.
  </summary>
  <token key="TransferMedium" variants="TransferMediums"/>
</histogram>

<histogram
    name="Nearby.Share.TransferDuration.Sender.ConnectionEstablishedToBandwidthUpgrade2{TransferMedium}"
    units="ms" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the time between when the sender establishes a connection to when
    the first bandwidth upgrade occurs for {TransferMedium}.
  </summary>
  <token key="TransferMedium" variants="TransferMediums"/>
</histogram>

<histogram
    name="Nearby.Share.TransferDuration.Sender.DiscoveredToConnectionEstablished"
    units="ms" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the time between when a sender discovers an endpoint to when the
    connection was successfully established. Note: This contains user
    interaction so it may vary significantly.
  </summary>
</histogram>

<histogram name="Nearby.Share.TransferDuration.Sender.InitiatedToAllFilesSent"
    units="ms" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the time between when user selects the receiver to when all files
    are successfully transferred. Note: This contains user interaction so it may
    vary significantly.
  </summary>
</histogram>

<histogram
    name="Nearby.Share.TransferDuration.Sender.InitiatedToSentIntroductionFrame"
    units="ms" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the time between when user selected the outgoing endpoint to when
    the introduction frame was sent to the receiving endpoint.
  </summary>
</histogram>

<histogram
    name="Nearby.Share.TransferDuration.Sender.StartSendFilesToAllFilesSent"
    units="ms" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the time between when sender starts to transfer files to when all
    files are successfully transferred.
  </summary>
</histogram>

<histogram name="Nearby.Share.VisibilityChoice" enum="NearbyShareVisibility"
    expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the user's chosen degree of visibility to their contacts, selected
    during onboarding or updated in settings. Emitted at login for users that
    have Nearby Share enabled.
  </summary>
</histogram>

<histogram name="Nearby.Share.WifiNetworkConfiguration.Result"
    enum="BooleanSuccess" expires_after="2025-04-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the success/failure of the Wi-Fi Network Configuration Handler. When
    Wi-Fi credentials are successfully received, the Configuration Handler will
    attempt to configure that network automatically. Emitted immediately after
    the transfer has completed and the Configuration Handler attempted to
    configure the network.
  </summary>
</histogram>

</histograms>

</histogram-configuration>