<!--
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 Private Metrics 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="PrivateMetrics.DataUploadConfig.DownloadSize" units="KiB"
    expires_after="2026-09-01">
  <owner>zhouzj@google.com</owner>
  <owner>private-metrics@google.com</owner>
  <summary>
    The size of the downloaded DataUploadConfig in kibibytes. Recorded on a
    successful download of the config.
  </summary>
</histogram>

<histogram name="PrivateMetrics.LogSize.OnSuccess" units="KB"
    expires_after="2026-12-27">
  <owner>zhouzj@google.com</owner>
  <owner>private-metrics@google.com</owner>
  <summary>
    Size in kilobytes (after compression) of an uploaded Private Metrics log.
    Recorded after a successful Private Metrics upload.
  </summary>
</histogram>

<histogram name="PrivateMetrics.LogUpload.Canceled.CellularConstraint"
    enum="BooleanCanceled" expires_after="2026-11-01">
  <owner>zhouzj@google.com</owner>
  <owner>private-metrics@google.com</owner>
  <summary>
    Logs whether a log was not uploaded due to cellular log throttling logic.
    Android only.
  </summary>
</histogram>

<histogram name="PrivateMetrics.LogUpload.ResponseOrErrorCode"
    enum="CombinedHttpResponseAndNetErrorCode" expires_after="2026-12-27">
  <owner>zhouzj@google.com</owner>
  <owner>private-metrics@google.com</owner>
  <summary>
    HTTP response codes and network errors encountered by Private Metrics when
    attempting to upload logs to the server.
  </summary>
</histogram>

<histogram name="PrivateMetrics.PersistentLogRecall.Status"
    enum="PersistedLogsLogReadStatus" expires_after="2026-09-01">
  <owner>zhouzj@google.com</owner>
  <owner>private-metrics@google.com</owner>
  <summary>
    The status when loading Private Metrics PersistedLogs from Prefs.
  </summary>
</histogram>

<histogram
    name="PrivateMetrics.PrivateInsights.ContextualCueEvents.Logging.OnShutdownCount"
    units="events" expires_after="2027-06-01">
  <owner>kjarosz@google.com</owner>
  <owner>private-metrics@google.com</owner>
  <summary>
    The number of in-memory queued contextual cue events when the
    PrivateInsightsService is shutting down. Logged once during service
    shutdown.
  </summary>
</histogram>

<histogram
    name="PrivateMetrics.PrivateInsights.ContextualCueEvents.Logging.QueuedCount"
    units="events" expires_after="2027-06-01">
  <owner>kjarosz@google.com</owner>
  <owner>private-metrics@google.com</owner>
  <summary>
    The number of in-memory queued contextual cue events immediately after
    logging a new contextual cue event. Logged each time LogContextualCueEvent
    is called.
  </summary>
</histogram>

<histogram
    name="PrivateMetrics.PrivateInsights.ContextualCueEvents.Logging.RemovedCount"
    units="events" expires_after="2027-06-01">
  <owner>kjarosz@google.com</owner>
  <owner>private-metrics@google.com</owner>
  <summary>
    The number of contextual cue events removed from the queue due to exceeding
    the maximum configured queue limit. Logged when events are removed during
    LogContextualCueEvent.
  </summary>
</histogram>

<histogram
    name="PrivateMetrics.PrivateInsights.ContextualCueEvents.Requeuing.DroppedCount"
    units="events" expires_after="2027-06-01">
  <owner>kjarosz@google.com</owner>
  <owner>private-metrics@google.com</owner>
  <summary>
    The number of contextual cue events dropped when attempting to requeue them
    due to exceeding the maximum configured queue limit. Logged during
    RequeueEvents.
  </summary>
</histogram>

<histogram
    name="PrivateMetrics.PrivateInsights.ContextualCueEvents.Requeuing.RequeuedCount"
    units="events" expires_after="2027-06-01">
  <owner>kjarosz@google.com</owner>
  <owner>private-metrics@google.com</owner>
  <summary>
    The number of contextual cue events successfully prepended back to the queue
    after a failed upload attempt. Logged during RequeueEvents.
  </summary>
</histogram>

<histogram name="PrivateMetrics.PrivateInsights.ContributedTaskCount"
    units="tasks" expires_after="2027-06-01">
  <owner>kjarosz@google.com</owner>
  <owner>private-metrics@google.com</owner>
  <summary>
    The number of contributed tasks in a Private Insights federated computation
    attempt. Logged when federated computation completes.
  </summary>
</histogram>

<histogram
    name="PrivateMetrics.PrivateInsights.EndorsementOptions.ParsingOutcome"
    enum="BooleanSuccess" expires_after="2027-06-01">
  <owner>lukaszgniecki@google.com</owner>
  <owner>kjarosz@google.com</owner>
  <owner>private-metrics@google.com</owner>
  <summary>
    Logs the outcome of parsing the binary AccessPolicyEndorsementOptions from
    the resource bundle. Logged when FcpSimpleTaskEnvironment creates the
    attestation verifier.
  </summary>
</histogram>

<histogram name="PrivateMetrics.PrivateInsights.FcpEvent"
    enum="PrivateInsightsFcpEvent" expires_after="2027-06-01">
  <owner>kjarosz@google.com</owner>
  <owner>private-metrics@google.com</owner>
  <summary>
    FCP-client-related events, as reported by FCP's event publisher interface.
    Logged each time the FCP client publishes an event.
  </summary>
</histogram>

<histogram name="PrivateMetrics.PrivateInsights.FcpHttpClient.BatchSize"
    units="requests" expires_after="2027-06-01">
  <owner>kjarosz@google.com</owner>
  <owner>private-metrics@google.com</owner>
  <summary>
    The number of HTTP requests passed in a single batch to the FCP HTTP client
    PerformRequests call. Logged when PerformRequests is called.
  </summary>
</histogram>

<histogram name="PrivateMetrics.PrivateInsights.FcpHttpClient.BytesReceived"
    units="bytes" expires_after="2027-06-01">
  <owner>kjarosz@google.com</owner>
  <owner>private-metrics@google.com</owner>
  <summary>
    The number of bytes received for an FCP HTTP client request. Logged when a
    request completes.
  </summary>
</histogram>

<histogram name="PrivateMetrics.PrivateInsights.FcpHttpClient.BytesSent"
    units="bytes" expires_after="2027-06-01">
  <owner>kjarosz@google.com</owner>
  <owner>private-metrics@google.com</owner>
  <summary>
    The number of bytes sent for an FCP HTTP client request upload. Logged when
    a request completes.
  </summary>
</histogram>

<histogram name="PrivateMetrics.PrivateInsights.FcpHttpClient.HttpResponseCode"
    enum="HttpResponseCode" expires_after="2027-06-01">
  <owner>kjarosz@google.com</owner>
  <owner>private-metrics@google.com</owner>
  <summary>
    The HTTP status code received by the FCP HTTP client for requests. Logged
    when response headers are received.
  </summary>
</histogram>

<histogram name="PrivateMetrics.PrivateInsights.FcpHttpClient.NetError"
    enum="NetErrorCodes" expires_after="2027-06-01">
  <owner>kjarosz@google.com</owner>
  <owner>private-metrics@google.com</owner>
  <summary>
    The net error code for FCP HTTP client requests. Logged when a request
    completes.
  </summary>
</histogram>

<histogram name="PrivateMetrics.PrivateInsights.FcpHttpClient.RequestDuration"
    units="ms" expires_after="2027-06-01">
  <owner>kjarosz@google.com</owner>
  <owner>private-metrics@google.com</owner>
  <summary>
    The duration of an FCP HTTP client request from creation to completion.
    Logged when a request completes.
  </summary>
</histogram>

<histogram name="PrivateMetrics.PrivateInsights.FcpHttpClient.RunnerCount"
    units="runners" expires_after="2027-06-01">
  <owner>kjarosz@google.com</owner>
  <owner>private-metrics@google.com</owner>
  <summary>
    The number of active request runners in FcpHttpRequestManager. Logged each
    time a new HTTP request is started on the UI thread.
  </summary>
</histogram>

<histogram name="PrivateMetrics.PrivateInsights.FederatedComputationOutcome"
    enum="PrivateInsightsFederatedComputationOutcome"
    expires_after="2027-06-01">
  <owner>kjarosz@google.com</owner>
  <owner>private-metrics@google.com</owner>
  <summary>
    The outcome of a Private Insights federated computation attempt. Logged when
    federated computation completes.
  </summary>
</histogram>

<histogram name="PrivateMetrics.PrivateInsights.TriggerUploadOutcome"
    enum="PrivateInsightsTriggerUploadOutcome" expires_after="2027-06-01">
  <owner>kjarosz@google.com</owner>
  <owner>private-metrics@google.com</owner>
  <summary>
    The outcome of a Private Insights trigger upload attempt. Logged each time
    TriggerUpload is called.
  </summary>
</histogram>

<histogram name="PrivateMetrics.PrivateInsights.Upload.PendingTime" units="ms"
    expires_after="2027-06-01">
  <owner>kjarosz@google.com</owner>
  <owner>private-metrics@google.com</owner>
  <summary>
    The time between when TriggerUpload was called and when UploadBlocking
    started running on the background thread. Logged when UploadBlocking starts.
  </summary>
</histogram>

<histogram name="PrivateMetrics.PrivateInsights.Upload.Time" units="ms"
    expires_after="2027-06-01">
  <owner>kjarosz@google.com</owner>
  <owner>private-metrics@google.com</owner>
  <summary>
    The time spent running UploadBlocking on the background thread. Logged when
    UploadBlocking finishes.
  </summary>
</histogram>

<histogram name="PrivateMetrics.ProtoCompressionRatio" units="%"
    expires_after="2026-09-01">
  <owner>zhouzj@google.com</owner>
  <owner>private-metrics@google.com</owner>
  <summary>
    Compression ratio of the serialized protobuf that will be uploaded to the
    Private Metrics server. This serialized protobuf is compressed using gzip.
  </summary>
</histogram>

<histogram name="PrivateMetrics.PUMA.LogRotationOutcome"
    enum="PumaLogRotationOutcome" expires_after="2027-02-07">
  <owner>kjarosz@google.com</owner>
  <owner>private-metrics@google.com</owner>
  <summary>
    The outcome of a PUMA log rotation. Logged for each triggered rotation.
  </summary>
</histogram>

<histogram name="PrivateMetrics.PUMA.ReportBuildingOutcome.Rc"
    enum="PumaReportBuildingOutcome" expires_after="2026-12-06">
  <owner>kjarosz@google.com</owner>
  <owner>private-metrics@google.com</owner>
  <summary>
    The outcome of building a report for PUMA for Regional Capabilities. Logged
    for each triggered report build.
  </summary>
</histogram>

<histogram name="PrivateMetrics.PUMA.ReportStoringOutcome.Rc"
    enum="PumaReportStoringOutcome" expires_after="2026-12-06">
  <owner>kjarosz@google.com</owner>
  <owner>private-metrics@google.com</owner>
  <summary>
    The outcome of storing a report for PUMA for Regional Capabilities. Logged
    for each triggered report store request.
  </summary>
</histogram>

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

<histogram name="PrivateMetrics.UnsentLogs.NumDropped" units="units"
    expires_after="2026-09-01">
  <owner>zhouzj@google.com</owner>
  <owner>private-metrics@google.com</owner>
  <summary>
    Counter for number of Private Metrics unsent logs removed from persistent
    storage.
  </summary>
</histogram>

</histograms>

</histogram-configuration>
