<!--
Copyright 2026 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 Indigo 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>

<histogram name="Indigo.Discovery.EligibilityCheck.Latency" units="ms"
    expires_after="2027-05-13">
  <owner>baranerf@google.com</owner>
  <owner>jbroman@chromium.org</owner>
  <owner>adithyas@chromium.org</owner>
  <summary>
    Time taken from triggering the action to receiving the combined eligibility
    result (local + remote). Monitors performance of the eligibility check flow,
    which involves network calls for remote status.
  </summary>
</histogram>

<histogram name="Indigo.Discovery.EligibilityCheck.RequestLatency" units="ms"
    expires_after="2027-05-13">
  <owner>baranerf@google.com</owner>
  <owner>jbroman@chromium.org</owner>
  <owner>adithyas@chromium.org</owner>
  <summary>
    Measures how long the network request takes for the remote eligibility
    check. Monitors the performance of the network call.
  </summary>
</histogram>

<histogram name="Indigo.Discovery.MetadataKeywordHeuristic" enum="Boolean"
    expires_after="2027-05-13">
  <owner>baranerf@google.com</owner>
  <owner>jbroman@chromium.org</owner>
  <owner>adithyas@chromium.org</owner>
  <summary>
    Records the decision returned by keyword heuristics. Helps track how often
    pages are identified as eligible for Indigo by the heuristics.
  </summary>
</histogram>

<histogram name="Indigo.Discovery.OptimizationGuideDecision"
    enum="OptimizationGuideOptimizationGuideDecision"
    expires_after="2027-05-13">
  <owner>baranerf@google.com</owner>
  <owner>jbroman@chromium.org</owner>
  <owner>adithyas@chromium.org</owner>
  <summary>
    Records the decision returned by the Optimization Guide for the current
    page. Helps track how often pages are identified as eligible for Indigo by
    the server-side hints.
  </summary>
</histogram>

<histogram name="Indigo.ImageReplacement.TotalDuration" units="ms"
    expires_after="2027-05-13">
  <owner>baranerf@google.com</owner>
  <owner>jbroman@chromium.org</owner>
  <owner>adithyas@chromium.org</owner>
  <summary>
    Records the total duration in milliseconds from starting the image
    transformation process until the image is ready to be displayed to the user.
  </summary>
</histogram>

<histogram name="Indigo.PageAction.ClickedEntryPoint"
    enum="IndigoPageActionEntryPoint" expires_after="2027-05-13">
  <owner>jbroman@chromium.org</owner>
  <owner>adithyas@chromium.org</owner>
  <owner>baranerf@google.com</owner>
  <summary>
    Records the entry point or presentation style of the Indigo page action when
    it is clicked by the user.
  </summary>
</histogram>

<histogram name="Indigo.PageAction.ShownEntryPoint"
    enum="IndigoPageActionEntryPoint" expires_after="2027-05-13">
  <owner>jbroman@chromium.org</owner>
  <owner>adithyas@chromium.org</owner>
  <owner>baranerf@google.com</owner>
  <summary>
    Records the entry point or presentation style of the Indigo page action when
    it is shown to the user.
  </summary>
</histogram>

<histogram name="Indigo.PageAction.TriggerSource" enum="IndigoTriggerSource"
    expires_after="2027-05-13">
  <owner>jbroman@chromium.org</owner>
  <owner>adithyas@chromium.org</owner>
  <owner>baranerf@google.com</owner>
  <summary>
    Records the trigger source for the Indigo page action when it is shown. This
    helps determine if Indigo was forced, or which logic was used to decide to
    show it (e.g., optimization guide hint).
  </summary>
</histogram>

<histogram name="Indigo.Transformation.IsCacheHit" enum="BooleanCacheHit"
    expires_after="2027-05-13">
  <owner>jbroman@chromium.org</owner>
  <owner>adithyas@chromium.org</owner>
  <owner>baranerf@google.com</owner>
  <summary>
    Records whether an Indigo transformation was served from the in-memory
    page-scoped image cache (hit) or required a new generation RPC (miss).
    Recorded on successful image replacement.
  </summary>
</histogram>

<histogram name="Indigo.Transformation.Result"
    enum="IndigoTransformationResult" expires_after="2027-05-13">
  <owner>jbroman@chromium.org</owner>
  <owner>adithyas@chromium.org</owner>
  <owner>baranerf@google.com</owner>
  <summary>
    Records the result of Indigo action invocation. Failure reasons are recorded
    synchronously when the user attempts to invoke the action (e.g., if they are
    not signed in or the service is not supported). The 'Success' result is
    recorded asynchronously only after the image generation completes
    successfully. Note that failure reasons are rarely recorded because the
    entry point is typically hidden for users who are known to be ineligible;
    therefore, low counts in failure buckets should not be misinterpreted as
    indicating that most users are eligible.
  </summary>
</histogram>

<histogram name="Indigo.Transformation.TriggerSource"
    enum="IndigoTransformationTriggerSource" expires_after="2027-05-13">
  <owner>jbroman@chromium.org</owner>
  <owner>adithyas@chromium.org</owner>
  <owner>baranerf@google.com</owner>
  <summary>
    Records the trigger source of a transformation event. This tracks which UI
    surface or action initiated the transformation request.
  </summary>
</histogram>

</histograms>

</histogram-configuration>
