<!--
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 DWA 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="DWA.InitSequence" enum="UmaInitSequence"
    expires_after="2026-03-01">
  <owner>zhouzj@google.com</owner>
  <owner>kurtosis-team@google.com</owner>
  <summary>
    Logged during DwaService initialization whether the init task or the initial
    log timer completed first. The expectation is the vast majority of the time,
    the init task should complete first. If metrics show otherwise, then it may
    indicate there's a bug in the DwaService init sequence and that it should be
    investigated.
  </summary>
</histogram>

<histogram name="DWA.LogSize.OnSuccess" units="KB" expires_after="2026-03-01">
  <owner>zhouzj@google.com</owner>
  <owner>kurtosis-team@google.com</owner>
  <summary>
    Size in kilobytes (after compression) of an uploaded DWA log. Recorded after
    a successful DWA upload.
  </summary>
</histogram>

<histogram name="DWA.LogUpload.Canceled.CellularConstraint"
    enum="BooleanCanceled" expires_after="2026-10-04">
  <owner>zhouzj@google.com</owner>
  <owner>kurtosis-team@google.com</owner>
  <summary>
    Logs whether a log was not uploaded due to cellular log throttling logic.
    Android only.
  </summary>
</histogram>

<histogram name="DWA.LogUpload.ResponseOrErrorCode"
    enum="CombinedHttpResponseAndNetErrorCode" expires_after="2026-03-01">
  <owner>zhouzj@google.com</owner>
  <owner>kurtosis-team@google.com</owner>
  <summary>
    HTTP response codes and network errors encountered by DWA when attempting to
    upload logs to the server.
  </summary>
</histogram>

<histogram name="DWA.PersistentLogRecall.Status"
    enum="PersistedLogsLogReadStatus" expires_after="2026-03-01">
  <owner>zhouzj@google.com</owner>
  <owner>kurtosis-team@google.com</owner>
  <summary>The status when loading DWA PersistedLogs from Prefs.</summary>
</histogram>

<histogram name="DWA.ProtoCompressionRatio" units="%"
    expires_after="2026-03-01">
  <owner>zhouzj@google.com</owner>
  <owner>kurtosis-team@google.com</owner>
  <summary>
    Compression ratio of the serialized protobuf that will be uploaded to the
    DWA server. This serialized protobuf is compressed using gzip.
  </summary>
</histogram>

<histogram name="DWA.UnsentLogs.DroppedSize" units="bytes"
    expires_after="2026-03-01">
  <owner>zhouzj@google.com</owner>
  <owner>kurtosis-team@google.com</owner>
  <summary>
    Number of bytes in an excessively large log that was discarded while
    persisting DWA logs to disk to retry during next chrome run.
  </summary>
</histogram>

<histogram name="DWA.UnsentLogs.NumDropped" units="units"
    expires_after="2026-03-01">
  <owner>zhouzj@google.com</owner>
  <owner>kurtosis-team@google.com</owner>
  <summary>
    Counter for number of DWA unsent logs removed from persistent storage.
  </summary>
</histogram>

</histograms>

</histogram-configuration>
