<!--
Copyright 2025 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 Wallet 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
chromium-metrics-reviews@google.com.
-->

<histogram-configuration>

<histograms>

<variants name="Wallet.NetworkRequest.RequestType">
  <variant name="GetUnmaskedPrivatePass" summary="unmasking a private pass"/>
  <variant name="UpsertPass" summary="upserting a public pass"/>
  <variant name="UpsertPrivatePass" summary="upserting a private pass"/>
</variants>

<variants name="Wallet.WalletablePass.PassCategory">
  <variant name="BoardingPass" summary="boarding passes"/>
  <variant name="EventPass" summary="event passes"/>
  <variant name="LoyaltyCard" summary="loyalty cards"/>
  <variant name="TransitTicket" summary="transit tickets"/>
  <variant name="Unspecified" summary="unspecified pass category"/>
</variants>

<histogram name="Wallet.NetworkRequest.OauthError"
    enum="GoogleServiceAuthError" expires_after="2026-12-31">
  <owner>vizcay@google.com</owner>
  <owner>1p-integrations-autofill@google.com</owner>
  <summary>
    Records the OAuth errors that occur when the WalletHttpClient requests an
    access token.
  </summary>
</histogram>

<histogram name="Wallet.NetworkRequest.{RequestType}.HttpResponseOrErrorCode"
    enum="CombinedHttpResponseAndNetErrorCode" expires_after="2026-12-31">
  <owner>vizcay@google.com</owner>
  <owner>1p-integrations-autofill@google.com</owner>
  <summary>
    Records the http response code or net error code that occur when making a
    network request to the wallet server for {RequestType}.
  </summary>
  <token key="RequestType" variants="Wallet.NetworkRequest.RequestType"/>
</histogram>

<histogram name="Wallet.NetworkRequest.{RequestType}.Latency" units="ms"
    expires_after="2026-12-31">
  <owner>vizcay@google.com</owner>
  <owner>1p-integrations-autofill@google.com</owner>
  <summary>
    Records the latency of network requests made to the wallet server for
    {RequestType}. This is an important metric to monitor the health of the
    integration.
  </summary>
  <token key="RequestType" variants="Wallet.NetworkRequest.RequestType"/>
</histogram>

<histogram name="Wallet.NetworkRequest.{RequestType}.ResponseByteSize"
    units="bytes" expires_after="2026-12-31">
  <owner>vizcay@google.com</owner>
  <owner>1p-integrations-autofill@google.com</owner>
  <summary>
    Records the size of network responses received from the wallet server for
    {RequestType}.
  </summary>
  <token key="RequestType" variants="Wallet.NetworkRequest.RequestType"/>
</histogram>

<histogram name="Wallet.WalletablePass.OptIn.Funnel.{PassCategory}"
    enum="WalletablePassOptInFunnelEvents" expires_after="2026-12-31">
  <owner>hanfeng@google.com</owner>
  <owner>wallet-chrome-integration@google.com</owner>
  <summary>
    Records the funnel of events for the {PassCategory} opt-in flow. This
    identifies whether the user engaged with the opt-in bubble or why the bubble
    was suppressed. Note that 'User already opted in' and 'Blocked by frequency
    cap' are logged even when the bubble is not shown. All other events are
    logged only when the bubble is displayed.
  </summary>
  <token key="PassCategory" variants="Wallet.WalletablePass.PassCategory"/>
</histogram>

<histogram name="Wallet.WalletablePass.Save.Funnel.{PassCategory}"
    enum="WalletablePassSaveFunnelEvents" expires_after="2026-12-31">
  <owner>hanfeng@google.com</owner>
  <owner>wallet-chrome-integration@google.com</owner>
  <summary>
    Records the funnel of events for the {PassCategory} save flow. This
    identifies whether the user engaged with the save bubble. All events are
    logged only when the bubble is displayed.
  </summary>
  <token key="PassCategory" variants="Wallet.WalletablePass.PassCategory"/>
</histogram>

<histogram name="Wallet.WalletablePass.ServerExtraction.Funnel.{PassCategory}"
    enum="WalletablePassServerExtractionFunnelEvents"
    expires_after="2026-12-31">
  <owner>hanfeng@google.com</owner>
  <owner>wallet-chrome-integration@google.com</owner>
  <summary>
    Records the funnel of events for the {PassCategory} server extraction flow.
    This identifies whether the extraction succeeded or why it failed. Note that
    some events are logged before model execution is attempted.
  </summary>
  <token key="PassCategory" variants="Wallet.WalletablePass.PassCategory"/>
</histogram>

</histograms>

</histogram-configuration>
