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

<histogram-configuration>

<histograms>

<histogram name="StructuredMetrics.ExternalMetricsDropped" units="count"
    expires_after="2024-07-14">
  <owner>andrewbregger@google.com</owner>
  <owner>jongahn@google.com</owner>
  <owner>chromeos-data-eng@google.com</owner>
  <owner>chrome-metrics-team@google.com</owner>
  <summary>
    The number of events that are dropped when processing External Metrics.
    Events are dropped once a threshold, 50 by default, is reached. This field
    is only recorded when recording is enabled.
  </summary>
</histogram>

<histogram name="StructuredMetrics.InitSequence" enum="UmaInitSequence"
    expires_after="2024-07-14">
  <owner>andrewbregger@google.com</owner>
  <owner>jongahn@google.com</owner>
  <owner>chromeos-data-eng@google.com</owner>
  <owner>chrome-metrics-team@google.com</owner>
  <summary>
    Logged during StructuredMetricsService 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
    StructuredMetricsService init sequence and that it should be investigated.
  </summary>
</histogram>

<histogram name="StructuredMetrics.LogStore.CompressionRatio" units="%"
    expires_after="2024-07-14">
  <owner>andrewbregger@google.com</owner>
  <owner>jongahn@google.com</owner>
  <owner>chromeos-data-eng@google.com</owner>
  <owner>chrome-metrics-team@google.com</owner>
  <summary>
    The compression ratio of Structured Metrics logs. Recorded when logs are
    stored.
  </summary>
</histogram>

<histogram name="StructuredMetrics.LogStore.Dropped" units="logs"
    expires_after="2024-07-14">
  <owner>andrewbregger@google.com</owner>
  <owner>jongahn@google.com</owner>
  <owner>chromeos-data-eng@google.com</owner>
  <owner>chrome-metrics-team@google.com</owner>
  <summary>
    The number of logs dropped for exceeding the log size constraints. Recorded
    when trimming the logs is complete and when the remaining logs is less then
    the original logs.
  </summary>
</histogram>

<histogram name="StructuredMetrics.LogStore.DroppedSize" units="KB"
    expires_after="2024-07-14">
  <owner>andrewbregger@google.com</owner>
  <owner>jongahn@google.com</owner>
  <owner>chromeos-data-eng@google.com</owner>
  <owner>chrome-metrics-team@google.com</owner>
  <summary>
    The size in KB of logs trimmed by log storage for being too large. Recorded
    when trimming the log and the compressed size of a log exceeds the max log
    size.
  </summary>
</histogram>

<histogram name="StructuredMetrics.Reporting.ActualUploadInterval"
    units="minutes" expires_after="2024-07-14">
  <owner>andrewbregger@google.com</owner>
  <owner>jongahn@google.com</owner>
  <owner>chromeos-data-eng@google.com</owner>
  <owner>chrome-metrics-team@google.com</owner>
  <summary>
    The actual interval between log upload start and previous log upload
    finished within the same process. A value of 0 indicates there was no
    previous upload.
  </summary>
</histogram>

<histogram name="StructuredMetrics.Reporting.HTTPErrorCode"
    enum="CombinedHttpResponseAndNetErrorCode" expires_after="2024-07-14">
  <owner>andrewbregger@google.com</owner>
  <owner>jongahn@google.com</owner>
  <owner>chromeos-data-eng@google.com</owner>
  <owner>chrome-metrics-team@google.com</owner>
  <summary>
    HTTP and network errors encountered by Structured Metrics when attempting to
    upload logs to the server through an HTTPS connection.
  </summary>
</histogram>

<histogram name="StructuredMetrics.Reporting.HTTPResponseCode"
    enum="CombinedHttpResponseAndNetErrorCode" expires_after="2024-07-14">
  <owner>andrewbregger@google.com</owner>
  <owner>jongahn@google.com</owner>
  <owner>chromeos-data-eng@google.com</owner>
  <owner>chrome-metrics-team@google.com</owner>
  <summary>
    HTTP response codes encountered by Structured Metrics when attempting to
    upload logs to the server through an HTTPS connection.
  </summary>
</histogram>

<histogram name="StructuredMetrics.Reporting.LogSize.OnSuccess" units="KB"
    expires_after="2024-07-14">
  <owner>andrewbregger@google.com</owner>
  <owner>jongahn@google.com</owner>
  <owner>chromeos-data-eng@google.com</owner>
  <owner>chrome-metrics-team@google.com</owner>
  <summary>
    Size in kilobytes (after compression) of an uploaded Structured Metrics log.
    Recorded after a successful Structured Metrics upload.
  </summary>
</histogram>

<histogram name="StructuredMetrics.Reporting.LogSize.RejectedSize" units="KB"
    expires_after="2024-07-14">
  <owner>andrewbregger@google.com</owner>
  <owner>jongahn@google.com</owner>
  <owner>chromeos-data-eng@google.com</owner>
  <owner>chrome-metrics-team@google.com</owner>
  <summary>
    Size in kilobytes (after compression) of a log rejected for being to large.
  </summary>
</histogram>

<histogram name="StructuredMetrics.UploadSize" units="bytes"
    expires_after="2024-07-14">
  <owner>andrewbregger@google.com</owner>
  <owner>jongahn@google.com</owner>
  <owner>chromeos-data-eng@google.com</owner>
  <owner>chrome-metrics-team@google.com</owner>
  <summary>
    The serialized size in bytes of the Structured Metrics payload attached to
    UMA. This correlates to the amount of memory Structured Metrics uses during
    an upload by UMA.
  </summary>
</histogram>

</histograms>

</histogram-configuration>
