chromium/tools/metrics/histograms/metadata/background/histograms.xml

<!--
Copyright 2020 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 Background 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
[email protected].
-->

<histogram-configuration>

<histograms>

<variants name="BackgroundFetchEvents">
  <variant name=".AbortEvent" summary="BackgroundFetchAbortEvent"/>
  <variant name=".ClickEvent" summary="BackgroundFetchClickEvent"/>
  <variant name=".FailEvent" summary="BackgroundFetchFailEvent"/>
  <variant name=".FetchedEvent" summary="BackgroundFetchedEvent"/>
  <variant name=".SuccessEvent" summary="BackgroundFetchSuccessEvent"/>
</variants>

<histogram
    name="BackgroundFetch.EventDispatchFailure.FindWorker{BackgroundFetchEvents}"
    enum="ServiceWorkerStatusCode" expires_after="2022-06-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the Service Worker status code that caused a Background Fetch API
    event to fail dispatching whilst trying to find the Service Worker.
    {BackgroundFetchEvents}
  </summary>
  <token key="BackgroundFetchEvents" variants="BackgroundFetchEvents"/>
</histogram>

<histogram
    name="BackgroundFetch.EventDispatchFailure.StartWorker{BackgroundFetchEvents}"
    enum="ServiceWorkerStatusCode" expires_after="2022-06-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the Service Worker status code that caused a Background Fetch API
    event to fail dispatching whilst trying to start the active Service Worker.
    {BackgroundFetchEvents}
  </summary>
  <token key="BackgroundFetchEvents" variants="BackgroundFetchEvents"/>
</histogram>

<histogram name="BackgroundMode.OnStartup.IsBackgroundModePrefEnabled"
    enum="BooleanEnabled" expires_after="2022-04-17">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Logged during BackgroundModeManager's initialization. Indicates the state of
    the kBackgroundModeEnabled pref on startup.
  </summary>
</histogram>

<histogram name="BackgroundSync.Event.BatchSize" units="units"
    expires_after="2024-02-06">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the number of `sync` events which were fired in a batch. A batch is
    defined as the set of `sync` events dispatched at the same time by the
    BackgroundSyncManager. One-shots usually run individually (a batch of one),
    unless the device was offline and multiple are waiting for the device to go
    back online.
  </summary>
</histogram>

<histogram name="BackgroundSync.Event.FromWakeupTask"
    enum="BackgroundSyncWakeupTask" expires_after="2024-02-06">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records whether the fired `sync` events upon completion orginated from a
    background wakeup task or the foreground.
  </summary>
</histogram>

<histogram name="BackgroundSync.Event.OneShotResultPattern"
    enum="BackgroundSyncResultPattern" expires_after="2025-01-05">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records whether a `sync` event succeeded or failed and whether the sync
    event finished in the foreground or background.

    A `sync` event finished in the foreground if the associated Service Worker
    Registration has a client at the time that the event finished.
  </summary>
</histogram>

<histogram name="BackgroundSync.Event.OneShotStartedInForeground"
    enum="BooleanInForeground" expires_after="2024-02-06">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records whether a one-shot sync started firing in the foreground or
    background. Called shortly before the event is fired.
  </summary>
</histogram>

<histogram name="BackgroundSync.Event.PeriodicResultPattern"
    enum="BackgroundSyncResultPattern" expires_after="2024-02-06">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records whether a periodic sync event succeeded or failed and whether the
    sync event finished in the foreground or background.

    A sync event finished in the foreground if the associated Service Worker
    Registration has a client at the time that the event finished.
  </summary>
</histogram>

<histogram name="BackgroundSync.Event.PeriodicStartedInForeground"
    enum="BooleanInForeground" expires_after="2024-02-06">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records whether a periodic sync event started firing in the foreground or
    background. Called shortly before the event is fired.
  </summary>
</histogram>

<histogram name="BackgroundSync.Event.Time" units="ms"
    expires_after="2024-04-28">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Time taken to execute a batch of one-shot sync events. A batch is defined as
    the set of sync events dispatched at the same time by the
    BackgroundSyncManager. One-shots usually run individually (a batch of one),
    unless the device was offline and multiple are waiting for the device to go
    back online.
  </summary>
</histogram>

<histogram name="BackgroundSync.LaunchTask.PlayServicesAvailable"
    enum="Boolean" expires_after="2024-04-28">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records whether Google Play Services is available to the Background Sync
    system on Android, for scheduling future sync events when the browser is not
    running. This will be logged at most once per run.
  </summary>
</histogram>

<histogram name="BackgroundSync.NetworkObserver.HasPermission" enum="Boolean"
    expires_after="2024-02-06">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records whether the browser has sufficient permissions to create a
    BackgroundSyncNetworkObserver object on Android, at the point when it tries
    to create it. This should never be false, but is being tracked in order to
    help resolve crbug.com/545473.
  </summary>
</histogram>

<histogram name="BackgroundSync.Periodic.Wakeup.DelayTime" units="ms"
    expires_after="2024-02-06">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records time elapsed since the soonest expected wake-up time. Recorded
    whenever a periodic Background Sync Chrome wake-up task is called after
    loading the native parts of the browser.
  </summary>
</histogram>

<histogram name="BackgroundSync.Registration.OneShot"
    enum="BackgroundSyncStatus" expires_after="2025-02-16">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the result of attempting to register a one-shot sync.
  </summary>
</histogram>

<histogram name="BackgroundSync.Registration.OneShot.CouldFire"
    enum="BooleanCouldFireImmediately" expires_after="2024-02-06">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the result of attempting to register a one-shot sync in a situation
    where the sync could fire immediately.
  </summary>
</histogram>

<histogram
    name="BackgroundSync.Registration.OneShot.EventSucceededAtCompletion"
    enum="BooleanSuccess" expires_after="2024-02-06">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records whether the dispatched sync event succeeded at the completion of the
    one-shot Background Sync registration.
  </summary>
</histogram>

<histogram name="BackgroundSync.Registration.OneShot.IsDuplicate"
    enum="BooleanRegistrationIsDuplicate" expires_after="2024-02-06">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records whether a one-shot sync registration exactly duplicates an existing
    registered sync.
  </summary>
</histogram>

<histogram
    name="BackgroundSync.Registration.OneShot.NumAttemptsForSuccessfulEvent"
    units="attempts" expires_after="2024-02-06">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the number of times a sync event was dispatched for a one-shot
    Background Sync registration before it succeeded.
  </summary>
</histogram>

<histogram name="BackgroundSync.Registration.Periodic"
    enum="BackgroundSyncStatus" expires_after="2024-06-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the result of attempting to register a periodic sync. This is called
    at each successful registration.
  </summary>
</histogram>

<histogram name="BackgroundSync.Registration.Periodic.IsDuplicate"
    enum="BooleanRegistrationIsDuplicate" expires_after="2024-02-06">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records whether a periodic sync registration duplicates the tag of an
    existing registered sync. Recorded upon each successful periodic Background
    Sync registration.
  </summary>
</histogram>

<histogram name="BackgroundSync.Registration.Periodic.MinInterval"
    units="seconds" expires_after="2024-02-06">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the minInterval requested, in seconds, when a periodic sync is
    successfully registered.
  </summary>
</histogram>

<histogram name="BackgroundSync.Unregistration.Periodic"
    enum="BackgroundSyncStatus" expires_after="2024-02-06">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the result of attempting to unregister a periodic sync.
  </summary>
</histogram>

<histogram name="BackgroundSync.Wakeup.DelayTime" units="ms"
    expires_after="2024-02-06">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    If BackgroundSync uses BackgroundTaskScheduler to wake up Chrome, this
    records the time elapsed since the soonest expected wake-up time. Recorded
    whenever a BackgroundSync background task is called after loading the native
    parts of the browser.
  </summary>
</histogram>

<histogram name="BackgroundSync.WakeupTaskFiredEvents.OneShot"
    enum="BackgroundSyncFiredEvents" expires_after="2024-02-06">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    If Chrome is woken up by the one shot Background Sync Background task, this
    records whether any sync events were fired as a result. Recorded whenever
    Chrome is woken up to process one-shot Background Sync registrations on
    Android.
  </summary>
</histogram>

<histogram name="BackgroundSync.WakeupTaskFiredEvents.Periodic"
    enum="BackgroundSyncFiredEvents" expires_after="2024-02-06">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    If Chrome is woken up by the periodic Background Sync Background task,this
    records whether any periodicsync events were fired as a result. Recorded
    whenever Chrome is woken up to process periodic Background Sync
    registrations on Android.
  </summary>
</histogram>

<histogram name="BackgroundTracing.SamplingProfilerUnwindResult"
    enum="SamplingProfilerUnwindResult" expires_after="M71">
  <owner>[email protected]</owner>
  <summary>Records the reason for unwind failues in sampling profiler.</summary>
</histogram>

</histograms>

</histogram-configuration>