<!--
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 Stability 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>

<variants name="CdmUtilityProcessType">
  <variant name="CdmServiceBroker"/>
  <variant name="MediaDrmSupport"/>
  <variant name="MediaFoundationServiceBroker"/>
</variants>

<histogram name="ChildProcess.BindHostReceiver.BatchSize" units="count"
    expires_after="2027-06-29">
  <owner>kmg@google.com</owner>
  <owner>chrome-stability-core@google.com</owner>
  <summary>
    Number of ChildProcessHost.BindHostReceiver requests coalesced into a single
    batched BindHostReceivers() IPC from a child process to the browser.
    Recorded once per flush. A value of 1 means no coalescing happened for that
    flush; larger values quantify how effectively the per-receiver bind IPCs are
    batched during process startup.
  </summary>
</histogram>

<histogram name="ChildProcess.Crashed.UtilityProcessExitCode"
    enum="WindowsExitCode" expires_after="never">
<!-- expires-never: Critical stability metrics. go/chrome-stability-metrics -->

  <owner>wfh@chromium.org</owner>
  <owner>chrome-stability-core@google.com</owner>
  <summary>
    Recorded when a crash occurs in a Utility process. On crash, the exit code
    will indicate the exception code of the crash.
  </summary>
</histogram>

<histogram name="ChildProcess.Crashed.UtilityProcessHash"
    enum="UtilityProcessNameHash" expires_after="never">
<!-- expires-never: Critical stability metrics. go/chrome-stability-metrics -->

  <owner>wfh@chromium.org</owner>
  <owner>chrome-stability-core@google.com</owner>
  <summary>
    Count of child utility process crashes, bucketed by the hash of their
    process name. The process name is typically the service name of the mojo
    service. Recorded when a Utility process crashes.
  </summary>
</histogram>

<histogram name="ChildProcess.Crashed2" enum="ProcessType2"
    expires_after="never">
<!-- expires-never: Critical stability metrics. go/chrome-stability-metrics -->

  <owner>wfh@chromium.org</owner>
  <owner>chrome-stability-core@google.com</owner>
  <summary>Count of child process crashes grouped by process type.</summary>
</histogram>

<histogram name="ChildProcess.DisconnectedAlive2" enum="ProcessType2"
    expires_after="never">
<!-- expires-never: For monitoring stability regressions. -->

  <owner>wfh@chromium.org</owner>
  <summary>
    Count of child process abnormal channel disconnects that are not classified
    and reported because we took the exit code too early. Grouped by process
    type.
  </summary>
</histogram>

<histogram name="ChildProcess.Killed2" enum="ProcessType2"
    expires_after="never">
<!-- expires-never: Critical stability metrics. go/chrome-stability-metrics -->

  <owner>wfh@chromium.org</owner>
  <owner>chrome-stability-core@google.com</owner>
  <summary>Count of child process kills grouped by process type.</summary>
</histogram>

<histogram name="ChildProcess.Launched.UtilityProcessHash"
    enum="UtilityProcessNameHash" expires_after="2027-01-17">
  <owner>wfh@chromium.org</owner>
  <summary>
    Count of child utility process launches, bucketed by the hash of their
    process name. The process name is typically the service name of the mojo
    service.
  </summary>
</histogram>

<histogram name="ChildProcess.LaunchFailed.UtilityProcessErrorCode"
    enum="LaunchErrorCodes" expires_after="never">
<!-- expires-never: Critical stability metrics. go/chrome-stability-metrics -->

  <owner>wfh@chromium.org</owner>
  <owner>chrome-stability-core@google.com</owner>
  <summary>
    A platform-specific error code returned from the attempt to launch a Utility
    process. Recorded when a Utility process fails to launch.
  </summary>
</histogram>

<histogram name="ChildProcess.LaunchFailed.UtilityProcessHash"
    enum="UtilityProcessNameHash" expires_after="never">
<!-- expires-never: Critical stability metrics. go/chrome-stability-metrics -->

  <owner>wfh@chromium.org</owner>
  <owner>chrome-stability-core@google.com</owner>
  <summary>
    Count of child utility process launch failures, bucketed by the hash of
    their process name. The process name is typically the service name of the
    mojo service. Recorded when a Utility process fails to launch.
  </summary>
</histogram>

<histogram name="ChildProcess.LaunchFailed.WinLastError" enum="WinGetLastError"
    expires_after="never">
<!-- expires-never: Critical stability metrics. go/chrome-stability-metrics -->

  <owner>wfh@chromium.org</owner>
  <owner>chrome-stability-core@google.com</owner>
  <summary>
    An extended Windows error code returned from GetLastError when failing to
    launch a utility process. Recorded when a Utility process fails to launch on
    Windows.
  </summary>
</histogram>

<histogram name="ChildProcess.ProcessLifetime.Utility" units="ms"
    expires_after="2025-05-11">
  <owner>olivierli@chromium.org</owner>
  <owner>fdoray@chromium.org</owner>
  <summary>
    The time elapsed between the creation and destruction of a utility process.
    Recorded when the process is recorded as destroyed in PerformanceManager.
  </summary>
</histogram>

<histogram name="CrashExitCodes.Extension" enum="CrashExitCodes"
    expires_after="never">
<!-- expires-never: Critical stability metrics. go/chrome-stability-metrics -->

  <owner>wfh@chromium.org</owner>
  <owner>chrome-stability-core@google.com</owner>
  <summary>
    The exit codes for crashed extension processes. Note: Due to
    https://crbug.com/805754, the enum labels are off by 1 for M56 and earlier.
  </summary>
</histogram>

<histogram name="CrashExitCodes.Renderer" enum="CrashExitCodes"
    expires_after="never">
<!-- expires-never: Critical stability metrics. go/chrome-stability-metrics -->

  <owner>wfh@chromium.org</owner>
  <owner>chrome-stability-core@google.com</owner>
  <summary>
    The exit codes for crashed renderer processes. Note: Due to
    https://crbug.com/805754, the enum labels are off by 1 for M56 and earlier.
  </summary>
</histogram>

<histogram name="Crashpad.AnrUpload.Skipped" enum="AnrSkippedReason"
    expires_after="2024-06-30">
  <owner>smaier@chromium.org</owner>
  <owner>crashpad-dev@chromium.org</owner>
  <summary>The reason that an ANR upload was skipped.</summary>
</histogram>

<histogram name="Crashpad.CrashReportPending" enum="CrashpadReportPending"
    expires_after="never">
<!-- expires-never: Crashpad metrics are continually needed to diagnose issues found in the field. -->

  <owner>jperaza@chromium.org</owner>
  <owner>crashpad-dev@chromium.org</owner>
  <summary>
    The reason that a crash report entered the upload pending state.
  </summary>
</histogram>

<histogram name="Crashpad.CrashReportSize" units="bytes" expires_after="never">
<!-- expires-never: Crashpad metrics are continually needed to diagnose issues found in the field. -->

  <owner>jperaza@chromium.org</owner>
  <owner>crashpad-dev@chromium.org</owner>
  <summary>The size of a crash report minidump on disk when captured.</summary>
</histogram>

<histogram name="Crashpad.CrashUpload.AttemptSuccessful"
    enum="CrashpadUploadAttemptStatus" expires_after="never">
<!-- expires-never: Crashpad metrics are continually needed to diagnose issues found in the field. -->

  <owner>jperaza@chromium.org</owner>
  <owner>crashpad-dev@chromium.org</owner>
  <summary>Logs whether a crash uploaded succeeded or failed.</summary>
</histogram>

<histogram name="Crashpad.CrashUpload.ErrorCode" units="int"
    expires_after="never">
<!-- expires-never: Crashpad metrics are continually needed to diagnose issues found in the field. -->

  <owner>justincohen@chromium.org</owner>
  <owner>crashpad-dev@chromium.org</owner>
  <summary>
    The error codes from [NSURLConnection
    sendSynchronousRequest:returningResponse:error:]
  </summary>
</histogram>

<histogram name="Crashpad.CrashUpload.Skipped"
    enum="CrashpadUploadSkippedReason" expires_after="never">
<!-- expires-never: Crashpad metrics are continually needed to diagnose issues found in the field. -->

  <owner>jperaza@chromium.org</owner>
  <owner>crashpad-dev@chromium.org</owner>
  <summary>The reason that a crash report upload was skipped.</summary>
</histogram>

<histogram name="Crashpad.ExceptionCaptureResult"
    enum="CrashpadExceptionCaptureResult" expires_after="never">
<!-- expires-never: Crashpad metrics are continually needed to diagnose issues found in the field. -->

  <owner>jperaza@chromium.org</owner>
  <owner>crashpad-dev@chromium.org</owner>
  <summary>The outcome of execution of the Crashpad exception handler.</summary>
</histogram>

<histogram name="Crashpad.ExceptionCode.Mac" enum="CrashpadMacExceptionCodes"
    expires_after="never">
<!-- expires-never: Crashpad metrics are continually needed to diagnose issues found in the field. -->

  <owner>mark@chromium.org</owner>
  <owner>crashpad-dev@chromium.org</owner>
  <summary>The exception code encountered in a crash on Mac OS X.</summary>
</histogram>

<histogram name="Crashpad.ExceptionCode.Win" enum="CrashpadWinExceptionCodes"
    expires_after="never">
<!-- expires-never: Crashpad metrics are continually needed to diagnose issues found in the field. -->

  <owner>jperaza@chromium.org</owner>
  <owner>crashpad-dev@chromium.org</owner>
  <summary>The exception code encountered in a crash on Windows.</summary>
</histogram>

<histogram name="Crashpad.ExceptionEncountered"
    enum="CrashpadExceptionProcessingState" expires_after="never">
<!-- expires-never: Crashpad metrics are continually needed to diagnose issues found in the field. -->

  <owner>jperaza@chromium.org</owner>
  <owner>crashpad-dev@chromium.org</owner>
  <summary>
    A count of the number of exceptions handled by Crashpad with two buckets for
    starting and finishing.
  </summary>
</histogram>

<histogram name="Crashpad.HandlerCrash.ExceptionCode.Mac"
    enum="CrashpadMacExceptionCodes" expires_after="never">
<!-- expires-never: Crashpad metrics are continually needed to diagnose issues found in the field. -->

  <owner>mark@chromium.org</owner>
  <owner>crashpad-dev@chromium.org</owner>
  <summary>
    The exception code encountered for a crash of the crash handler process on
    Mac OS X.
  </summary>
</histogram>

<histogram name="Crashpad.HandlerCrash.ExceptionCode.Win"
    enum="CrashpadWinExceptionCodes" expires_after="never">
<!-- expires-never: Crashpad metrics are continually needed to diagnose issues found in the field. -->

  <owner>jperaza@chromium.org</owner>
  <owner>crashpad-dev@chromium.org</owner>
  <summary>
    The exception code encountered for a crash of the crash handler process on
    Windows.
  </summary>
</histogram>

<histogram name="Crashpad.HandlerLifetimeMilestone"
    enum="CrashpadLifetimeMilestone" expires_after="M90">
  <expired_intentionally>
    Kept as a diagnostic metric.
  </expired_intentionally>
  <owner>jperaza@chromium.org</owner>
  <owner>crashpad-dev@chromium.org</owner>
  <summary>Handler start/crash/exit events.</summary>
</histogram>

<histogram name="Crashpad.IntermediateDump.Reader.InvalidKeySize"
    enum="CrashpadIntermediateDumpKey" expires_after="2027-02-20">
  <owner>justincohen@chromium.org</owner>
  <owner>crashpad-dev@chromium.org</owner>
  <summary>
    Records key id when id has an invalid sizein an intermediate dump.
  </summary>
</histogram>

<histogram name="Crashpad.IntermediateDump.Reader.MissingKey"
    enum="CrashpadIntermediateDumpKey" expires_after="2027-02-20">
  <owner>justincohen@chromium.org</owner>
  <owner>crashpad-dev@chromium.org</owner>
  <summary>Records key id when id is missing in an intermediate dump.</summary>
</histogram>

<histogram name="Stability.Android.KillSpareRendererAvailability.{KillType}"
    enum="SpareRendererAvailabilityWhenKilled" expires_after="2027-02-14">
  <owner>gjc@google.com</owner>
  <owner>chrome-loading@google.com</owner>
  <summary>
    Records whether a process killed because of KillType is a spare renderer and
    the spare renderer existence. Recorded when a child process exits and the
    kill type in the ChildProcessTerminationInfo matches KillType. KillType
    Details: {KillType}
  </summary>
  <token key="KillType">
    <variant name="IntentionalKill"
        summary="Intentionally killed by the browser process"/>
    <variant name="OOM"
        summary="Killed because of out of memory. All the non-clean exits
                 that is neither a crash nor requested by the browser or the
                 renderer are classified as out of memory."/>
  </token>
</histogram>

<histogram name="Stability.Android.MinidumpUploadingTime" units="ms"
    expires_after="2023-12-24">
  <owner>shaktisahu@chromium.org</owner>
  <owner>src/components/minidump_uploader/OWNERS</owner>
  <summary>
    Records the time (uptimeMillis) taken by a minidump uploading task to
    complete. Recorded when the task finished callback is invoked.
  </summary>
</histogram>

<histogram name="Stability.Android.ProcessedCrashCounts"
    enum="AndroidProcessedCrashCounts" expires_after="never">
<!-- expires-never: Critical stability metric that includes OOM rate. -->

  <owner>boliu@chromium.org</owner>
  <owner>ssid@chromium.org</owner>
  <owner>wnwen@chromium.org</owner>
  <summary>
    Individual enum counts specific conditions of child process terminations.
    There are too many individual states to enumerate into a single histogram,
    so this effectively does the aggregration that normally happens on the
    server side in the client instead. The benefit is this is easily extensible
    in the future, and downside is that it does not allow additional server side
    analysis. Note a single child process termination may fall into multiple
    enums.
  </summary>
</histogram>

<histogram name="Stability.Android.ProcessedRealMinidumps"
    enum="AndroidProcessedMinidumps" expires_after="2027-03-22">
  <owner>wnwen@chromium.org</owner>
  <owner>src/components/minidump_uploader/OWNERS</owner>
  <summary>
    Records the number of non-simulated minidumps processed by Crashpad, split
    by process type. This metric is similar to one that could be computed
    server-side based on received crash uploads; but the client-side metric also
    includes any minidumps that were not successfully uploaded.
  </summary>
</histogram>

<histogram name="Stability.Android.RendererCrash" enum="Boolean"
    expires_after="2027-01-17">
  <owner>wnwen@chromium.org</owner>
  <summary>
    Counts renderer crashes including OOMs. Android only. Mirrors old stability
    proto renderer crashes.
  </summary>
</histogram>

<histogram name="Stability.Android.SystemExitReason{AndroidProcessExitReasons}"
    enum="AndroidProcessExitReason" expires_after="2027-02-07">
  <owner>boliu@chromium.org</owner>
  <owner>ssid@chromium.org</owner>
  <owner>wnwen@chromium.org</owner>
  <summary>
    Reason given by Android ActivityManager for the exit of the process, only
    recorded in Android R+. Recorded on the next browser startup for browser
    exits, or right after the process died for child processes.

    Records API failed when the ActivityManager does not return a reason.
    {AndroidProcessExitReasons}
  </summary>
  <token key="AndroidProcessExitReasons">
    <variant name=".Browser2"
        summary="Recorded for all Browser process exits that launched a
                 ChromeActivity at some point."/>
    <variant name=".GpuForegroundOom"
        summary="Recorded for foreground GPU process OOM crashes."/>
    <variant name=".UtilityForegroundOom"
        summary="Recorded for foreground utility process OOM crashes."/>
    <variant name=".VisibleMainFrameOom"
        summary="Recorded for visible main frame renderer OOM crashes."/>
    <variant name=".VisibleSubframeOom"
        summary="Recorded for visible subframe renderer OOM crashes."/>
  </token>
</histogram>

<histogram name="Stability.BadMessageTerminated.Chrome"
    enum="BadMessageReasonChrome" expires_after="never">
<!-- expires-never: Monitoring renderer kills triggered by //chrome. -->

  <owner>creis@chromium.org</owner>
  <owner>jamescook@chromium.org</owner>
  <summary>
    Count of processes killed by chrome/browser because they sent an IPC that
    couldn't be properly handled. Categories are the reasons (code locations)
    for the kills.
  </summary>
</histogram>

<histogram name="Stability.BadMessageTerminated.Content"
    enum="BadMessageReasonContent" expires_after="never">
<!-- expires-never: Monitoring renderer kills triggered by //content. -->

  <owner>jam@chromium.org</owner>
  <owner>jamescook@chromium.org</owner>
  <summary>
    Count of child processes killed because they sent an IPC that couldn't be
    properly handled. Categories are the reasons (code locations) for the kills.
  </summary>
</histogram>

<histogram name="Stability.BadMessageTerminated.Extensions"
    enum="BadMessageReasonExtensions" expires_after="never">
<!-- expires-never: Monitoring renderer kills triggered by //extensions. -->

  <owner>rdevlin.cronin@chromium.org</owner>
  <owner>extensions-core@chromium.org</owner>
  <summary>
    Count of extension processes killed because they sent an IPC that couldn't
    be properly handled. Categories are the reasons (code locations) for the
    kills.
  </summary>
</histogram>

<histogram name="Stability.BadMessageTerminated.GuestView"
    enum="BadMessageReasonGuestView" expires_after="never">
<!-- expires-never: Monitoring renderer kills triggered by GuestView. -->

  <owner>mcnee@chromium.org</owner>
  <owner>wjmaclean@chromium.org</owner>
  <summary>
    Count of processes killed because they sent a bad IPC that couldn't be
    properly handled. Categories are the reasons (code locations) for the kills.

    Warning: this histogram was expired from M85 to M97; data may be missing.
  </summary>
</histogram>

<histogram name="Stability.BadMessageTerminated.PasswordManager"
    enum="BadMessageReasonPasswordManager" expires_after="never">
<!-- expires-never: Monitoring renderer kills triggered by password manager. -->

  <owner>creis@chromium.org</owner>
  <owner>jamescook@chromium.org</owner>
  <summary>
    Count of processes killed because they sent a bad IPC that couldn't be
    properly handled. Categories are the reasons (code locations) for the kills.

    Warning: this histogram was expired from M85 to M97; data may be missing.
  </summary>
</histogram>

<histogram name="Stability.BrowserExitCodes" enum="WindowsExitCode"
    expires_after="never">
<!-- expires-never: Critical stability metrics. go/chrome-stability-metrics -->

  <owner>siggi@chromium.org</owner>
  <owner>chrome-stability-core@google.com</owner>
  <summary>
    Records the exit code of the browser process (on Windows) from the previous
    launch. On crash, the exit code will indicate the exception code of the
    crash. This is emitted in stability data with the first report on a
    subsequent launch. Note: Due to https://crbug.com/805754, the enum labels
    for RESULT_CODE_* are off by 1 for M56 and earlier.
  </summary>
</histogram>

<histogram name="Stability.ChildFrameCrash.PageEligibleToDiscard"
    enum="Boolean" expires_after="2027-01-10">
  <owner>kawasin@google.com</owner>
  <owner>boliu@chromium.org</owner>
  <summary>
    Logs whether a page with a crashed subframe is eligible to be discarded at
    DiscardPageWithCrashedSubframePolicy. Logged once per subframe process
    crash.
  </summary>
</histogram>

<histogram name="Stability.ChildFrameCrash.PageWillReload" enum="Boolean"
    expires_after="2027-01-17">
  <owner>kawasin@google.com</owner>
  <owner>boliu@chromium.org</owner>
  <summary>
    Logs whether a page with a crashed subframe will be marked for reload. The
    logic is implemented as ReloadHiddenTabsWithCrashedSubframes feature but
    DiscardPageWithCrashedSubframePolicy logs the result with the same logic.
    This is a supplementary metrics to understand
    Stability.ChildFrameCrash.PageEligibleToDiscard metrics better. Logged once
    per subframe process crash.
  </summary>
</histogram>

<histogram name="Stability.ChildFrameCrash.ShownAfterCrashingReason"
    enum="ShownAfterCrashingReason" expires_after="2026-08-24">
  <owner>alexmos@chromium.org</owner>
  <owner>boliu@chromium.org</owner>
  <owner>lukasza@chromium.org</owner>
  <summary>
    Logs the reason that a crashed subframe was shown. Logged at most once per
    crash, and only if the subframe was hidden when it crashed and became
    visible later.
  </summary>
</histogram>

<histogram name="Stability.ChildFrameCrash.TabMarkedForReload"
    enum="BooleanMarkedForReload" expires_after="2026-12-27">
  <owner>alexmos@chromium.org</owner>
  <owner>boliu@chromium.org</owner>
  <summary>
    Logs whether or not a tab is marked for reload when a cross-process subframe
    crashes. Logged once per subframe process crash.
  </summary>
</histogram>

<histogram name="Stability.ChildFrameCrash.TabMarkedForReload.Visibility"
    enum="FrameVisibility" expires_after="2026-11-01">
  <owner>alexmos@chromium.org</owner>
  <owner>boliu@chromium.org</owner>
  <summary>
    Logs the visibility of a subframe when a subframe process crashes and the
    corresponding tab is marked for reload. This indicates whether the crashed
    subframe was visible or scrolled out of view at the time of crash.
  </summary>
</histogram>

<histogram name="Stability.ChildFrameCrash.Visibility" enum="CrashVisibility"
    expires_after="2027-01-17">
  <owner>alexmos@chromium.org</owner>
  <owner>boliu@chromium.org</owner>
  <owner>lukasza@chromium.org</owner>
  <summary>
    Logged after detecting that a sad subframe is shown (logged at most once per
    crash).
  </summary>
</histogram>

<histogram name="Stability.CommitLimitTerminatedTab.ReloadResult"
    enum="CommitLimitTerminatedTabReloadResult" expires_after="2026-11-01">
  <owner>aattar@google.com</owner>
  <owner>chrome-stability-core@google.com</owner>
  <summary>
    Records the outcome of a user's attempt to reload a tab that was terminated
    due to system commit limits
    (CHROME_RESULT_CODE_TERMINATED_BY_OTHER_PROCESS_ON_COMMIT_FAILURE). Windows
    only.

    At most one sample is recorded per commit-limit termination.

    The exact emission points for each bucket are:

    - Success: A hidden tab was discarded after the termination and, once made
    visible again, its reload navigation committed without an error page.

    - Failed: Repeated OOM / Other Error: The renderer exited again (with a
    commit-limit or other abnormal exit, respectively) while the recovery was
    being tracked.

    - Failed: Hidden Tab Not Discarded: The hidden tab was not discarded and
    became visible again, which shows a sad tab.

    Unrecorded cases (no sample recorded): Navigating to a different URL, hiding
    the tab during tracking, or closing the tab (normal termination).
  </summary>
</histogram>

<histogram name="Stability.CommitLimitTerminatedTab.Visibility"
    enum="CommitLimitTerminatedTabVisibility" expires_after="2026-11-01">
  <owner>aattar@google.com</owner>
  <owner>chrome-stability-core@google.com</owner>
  <summary>
    Records the visibility of a tab when its renderer was terminated due to
    system commit limits
    (CHROME_RESULT_CODE_TERMINATED_BY_OTHER_PROCESS_ON_COMMIT_FAILURE). Logged
    once at termination time. Windows only.
  </summary>
</histogram>

<histogram name="Stability.Counts2" enum="StabilityEventType"
    expires_after="never">
<!--
  expires-never: Critical stability metrics. go/chrome-browser-guardrail-metrics.
  -->

  <owner>rkaplow@chromium.org</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <owner>chrome-analysis-team@google.com</owner>
  <improvement direction="LOWER_IS_BETTER"/>
  <summary>
    Collects various counters related to stability. For the crash-related
    buckets, see
    https://chromium.googlesource.com/chromium/src/+/main/docs/stability.md for
    details on what aspects of stability are being measured and how, how the
    measured aspects reflect (or don't reflect) crashes, and how they relate to
    crash reports in the Crash database.

    In M129 we are more accurately tracking renderer process launch failures,
    and expect to find a significant spike in volume for this bucket.
  </summary>
</histogram>

<histogram name="Stability.DebugScenario.Navigation" enum="DebugScenario"
    expires_after="2023-08-08">
  <owner>nasko@chromium.org</owner>
  <summary>
    Logged at the time when a complex debugging scenario is encountered. The
    enum value is the type of scenario encountered. This metric will give us two
    benefits: 1. It will tell us the magnitute of the scenario being debugged
    since crash reports are throttled client side and cannot presently expess
    magnitude. 2. If the client is configured to report traces based on this
    metric, it will upload Chrometto trace for analysis by developers.
  </summary>
</histogram>

<histogram name="Stability.DumpWithoutCrashingStatus"
    enum="DumpWithoutCrashingStatus" expires_after="never">
<!-- expires-never: Used for monitoring the throttling frequency of
     DumpWithoutCrashing. -->

  <owner>dcheng@chromium.org</owner>
  <owner>wfh@chromium.org</owner>
  <owner>adkushwa@microsoft.com</owner>
  <summary>
    Keeps a count of number of times uploading the dump was throttled when
    calling DumpWithoutCrashing.
  </summary>
</histogram>

<histogram name="Stability.Experimental.PageLoads" enum="StabilityPageLoadType"
    expires_after="2025-08-31">
  <owner>fdoray@chromium.org</owner>
  <owner>catan-team@chromium.org</owner>
  <summary>
    Counts &quot;pageloads&quot; by type. This is recorded when a page stops
    loading, i.e. from WebContentsObserver::DidStopLoading. The sum of all
    buckets of this histogram should be equal to the &quot;Total pageloads&quot;
    shown on Stability dashboards and can be used to diagnose changes to this
    value.
  </summary>
</histogram>

<histogram
    name="Stability.Internals.FileMetricsProvider.BrowserMetrics.UnsentFilesCount"
    units="counts" expires_after="M89">
  <owner>michaelbai@chromium.org</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    The number of unsent files. Emitted when the stability is recorded.
  </summary>
</histogram>

<histogram
    name="Stability.Internals.FileMetricsProvider.BrowserMetrics.UnsentSamplesCount"
    units="samples" expires_after="M89">
  <owner>michaelbai@chromium.org</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    The total number of samples that will be lost if ASSOCIATE_INTERNAL_PROFILE
    hasn't been enabled since the previous stability recorded. This is different
    than the previous browser run because one file was just uploaded before the
    stability is recorded.
  </summary>
</histogram>

<histogram name="Stability.Internals.SystemCrashCount" units="crashes"
    expires_after="never">
<!-- expires-never: Necessary context for understanding stability metrics. -->

  <owner>davidbienvenu@chromium.org</owner>
  <owner>jessemckenna@google.com</owner>
  <summary>
    Number of times a browser crash was detected, where the browser was last
    known to be alive in a Windows system session that terminated abnormally.
  </summary>
</histogram>

<histogram name="Stability.IOS.Crashpad.Initialized" enum="BooleanSuccess"
    expires_after="2027-04-26">
  <owner>justincohen@chromium.org</owner>
  <owner>olivierrobin@chromium.org</owner>
  <summary>
    Records whether Crashpad init was successful. Recorded on every app startup.
  </summary>
</histogram>

<histogram name="Stability.IOS.PostCrashAction" enum="IOSPostCrashAction"
    expires_after="2026-12-14">
  <owner>justincohen@chromium.org</owner>
  <owner>bling-fundamentals@google.com</owner>
  <summary>
    Recorded when the app is foregrounded. Records what action is taken after an
    unclear shutdown (likely a crash).
  </summary>
</histogram>

<histogram name="Stability.iOS.TabCountBefore{Event}" units="tabs"
    expires_after="2026-11-29">
  <owner>justincohen@chromium.org</owner>
  <owner>bling-fundamentals@google.com</owner>
  <summary>
    The number of tabs opened in the previous session when the app starts after
    {Event}. Can be used to understand if there is a correlation between
    increase of number of tabs and decline in stability. iOS Only.

    Since this metric attributes the previous session's shutdown type to the
    current session's logs, configuration changes (e.g., OS version, Finch
    configurations) that might have affected the shutdown may not be correctly
    logged with the session they occurred in.
  </summary>
  <token key="Event">
    <variant name="CleanShutdown" summary="a clean shutdown"/>
    <variant name="Crash"
        summary="a crash. This metric is a superset of these 2 metrics:
                 Stability.iOS.TabCountBeforeSignalCrash,
                 Stability.iOS.TabCountBeforeUTE"/>
    <variant name="Freeze" summary="a UI thread freeze"/>
    <variant name="SignalCrash" summary="a signal crash"/>
    <variant name="UTE" summary="a crash (UTE or XTE)"/>
  </token>
</histogram>

<histogram name="Stability.IOS.UTE.AppWillTerminateWasCalledInForeground"
    enum="Boolean" expires_after="2024-10-09">
  <owner>olivierrobin@chromium.org</owner>
  <owner>justincohen@chromium.org</owner>
  <summary>
    Recorded on iOS when applicationWillTerminate callback is called when app is
    in the foreground. When this happens the app will not write clean exit
    beacon and shutdown will not be clean.
  </summary>
</histogram>

<histogram name="Stability.iOS.UTE.DeviceThermalState"
    enum="IOSDeviceThermalState" expires_after="2026-09-20">
  <owner>michaeldo@chromium.org</owner>
  <owner>olivierrobin@chromium.org</owner>
  <summary>
    The thermal state of the device when a crash occured. Logged on application
    launch if the last session terminated in an unclean state.

    Since this metric attributes the previous session's shutdown type to the
    current session's logs, configuration changes (e.g., OS version, Finch
    configurations) that might have affected the shutdown may not be correctly
    logged with the session they occurred in.
  </summary>
</histogram>

<histogram name="Stability.iOS.UTE.HasPossibleExplanation"
    enum="BooleanHasPossibleExplanation" expires_after="2027-02-07">
  <owner>michaeldo@chromium.org</owner>
  <owner>olivierrobin@chromium.org</owner>
  <summary>
    Indicates whether or not one of the Stability.iOS.UTE.* metrics could
    explain the cause of the UTE which terminated the previous session. Logged
    on application launch if the last session terminated in an unclean state.

    Since this metric attributes the previous session's shutdown type to the
    current session's logs, configuration changes (e.g., OS version, Finch
    configurations) that might have affected the shutdown may not be correctly
    logged with the session they occurred in.
  </summary>
</histogram>

<histogram name="Stability.iOS.UTE.MobileSessionAppState" enum="IOSAppState"
    expires_after="2027-08-19">
  <owner>justincohen@chromium.org</owner>
  <owner>olivierrobin@chromium.org</owner>
  <summary>
    Recorded when app starts after Unexplained Termination Event (UTE) or
    Explained Termination Event (XTE). Values other than Active indicate that
    prefs::kLastSessionExitedCleanly was not properly stored.

    Since this metric attributes the previous session's shutdown type to the
    current session's logs, configuration changes (e.g., OS version, Finch
    configurations) that might have affected the shutdown may not be correctly
    logged with the session they occurred in.
  </summary>
</histogram>

<histogram name="Stability.iOS.UTE.MobileSessionAppWillTerminateWasReceived"
    enum="AppWillTerminateReceived" expires_after="2026-06-01">
  <owner>michaeldo@chromium.org</owner>
  <owner>olivierrobin@chromium.org</owner>
  <summary>
    Recorded when app starts after Unexplained Termination Event (UTE) or
    Explained Termination Event (XTE). UTEs/XTEs can happen when app did not
    finish writing prefs. This histogram should help to understand if prefs did
    not get written during normal app termination sequence when
    ApplicationWillTerminate notification was called.

    Since this metric attributes the previous session's shutdown type to the
    current session's logs, configuration changes (e.g., OS version, Finch
    configurations) that might have affected the shutdown may not be correctly
    logged with the session they occurred in.
  </summary>
</histogram>

<histogram name="Stability.iOS.UTE.MobileSessionOOMShutdownHint"
    enum="OOMShutdownHint" expires_after="2024-04-24">
  <owner>olivierrobin@chromium.org</owner>
  <owner>sdefresne@chromium.org</owner>
  <summary>
    Recorded when app starts after Unexplained Termination Event (UTE) or
    Explained Termination Event (XTE). UTEs/XTEs can be caused by large memory
    allocations and this histogram provides information which memory heavy
    operation has being performed before UTE/XTE.

    Since this metric attributes the previous session's shutdown type to the
    current session's logs, configuration changes (e.g., OS version, Finch
    configurations) that might have affected the shutdown may not be correctly
    logged with the session they occurred in.
  </summary>
</histogram>

<histogram name="Stability.iOS.UTE.OSRestartedAfterPreviousSession"
    enum="BooleanRebooted" expires_after="2026-06-01">
  <owner>olivierrobin@chromium.org</owner>
  <owner>michaeldo@chromium.org</owner>
  <summary>
    true if OS was restarted after the previous session. Logged on application
    launch if the last session terminated in an unclean state. If this is false
    then UTE was not caused by OS restart or shutdown.

    Since this metric attributes the previous session's shutdown type to the
    current session's logs, configuration changes (e.g., OS version, Finch
    configurations) that might have affected the shutdown may not be correctly
    logged with the session they occurred in.
  </summary>
</histogram>

<histogram name="Stability.iOS.UTE.OSVersion" enum="VersionComparison"
    expires_after="2026-06-01">
  <owner>michaeldo@chromium.org</owner>
  <owner>olivierrobin@chromium.org</owner>
  <summary>
    Logged on the session following a crash with the result of a comparison
    between the OS version of the session which crashed and the current OS
    version. Logged on application launch if the last session terminated in an
    unclean state.

    Since this metric attributes the previous session's shutdown type to the
    current session's logs, configuration changes (e.g., OS version, Finch
    configurations) that might have affected the shutdown may not be correctly
    logged with the session they occurred in.
  </summary>
</histogram>

<histogram name="Stability.iOS.UTE.TimeBetweenUTEAndNextLaunch" units="ms"
    expires_after="2027-02-07">
  <owner>michaeldo@chromium.org</owner>
  <owner>olivierrobin@chromium.org</owner>
  <summary>
    The estimated amount of time between when a crash occurred and when the user
    relaunched the application. Logged on application launch if the last session
    terminated in an unclean state.

    Since this metric attributes the previous session's shutdown type to the
    current session's logs, configuration changes (e.g., OS version, Finch
    configurations) that might have affected the shutdown may not be correctly
    logged with the session they occurred in.
  </summary>
</histogram>

<histogram name="Stability.Media.{ProcessType}.Crash.ExitCode"
    enum="WindowsExitCode" expires_after="2026-12-09">
  <owner>sangbaekpark@chromium.org</owner>
  <owner>media-dev-uma@chromium.org</owner>
  <summary>
    Recorded when a crash occurs in a CDM utility process. On crash, the exit
    code will indicate the exception code of the crash.
  </summary>
  <token key="ProcessType" variants="CdmUtilityProcessType"/>
</histogram>

<histogram name="Stability.Media.{ProcessType}.Launch" enum="Boolean"
    expires_after="2027-02-07">
  <owner>sangbaekpark@chromium.org</owner>
  <owner>media-dev-uma@chromium.org</owner>
  <summary>
    Recorded when a CDM utility process either succeeded or failed to launch.
  </summary>
  <token key="ProcessType" variants="CdmUtilityProcessType"/>
</histogram>

<histogram name="Stability.Media.{ProcessType}.Launch.LaunchErrorCode"
    enum="LaunchErrorCodes" expires_after="2026-12-09">
  <owner>sangbaekpark@chromium.org</owner>
  <owner>media-dev-uma@chromium.org</owner>
  <summary>
    A platform-specific error code returned from the attempt to launch a CDM
    utility process. Recorded when a CDM utility process fails to launch.
  </summary>
  <token key="ProcessType" variants="CdmUtilityProcessType"/>
</histogram>

<histogram name="Stability.Media.{ProcessType}.Launch.WinLastError"
    enum="WinGetLastError" expires_after="2026-12-09">
  <owner>sangbaekpark@chromium.org</owner>
  <owner>media-dev-uma@chromium.org</owner>
  <summary>
    An extended Windows error code returned from GetLastError when failing to
    launch a CDM utility process. Recorded when a utility process fails to
    launch on Windows.
  </summary>
  <token key="ProcessType" variants="CdmUtilityProcessType"/>
</histogram>

<histogram name="Stability.MobileSessionShutdownType"
    enum="MobileSessionShutdownType" expires_after="2027-02-21">
  <owner>michaeldo@chromium.org</owner>
  <owner>olivierrobin@chromium.org</owner>
  <summary>
    Type of the shutdown. Prior to M146, this was recorded at startup and logs a
    sample for the previous session. Starting in M146, this is recorded at least
    3 seconds after startup and attributed to the current session. Clean
    shutdowns are where the app enters the background before being killed. Other
    shutdowns are all some sort of crash. The absence of a crash log indicates
    that the app was killed by the OS, normally due to memory pressure. If
    memory pressure is extremely high, the app may not have had a chance to
    response to a memory warning before being killed. For first launch after
    upgrade discard this metric for unclear shutdowns, as the log is not
    recorded for the previous session. Prior to M146 this was also discarded,
    but recorded regardless of an unclear shutdown or not. Since this metric
    attributes the previous session's shutdown type to the current session's
    logs, configuration changes (e.g., OS version, Finch configurations) that
    might have affected the shutdown may not be correctly logged with the
    session they occurred in.
  </summary>
</histogram>

<histogram name="Stability.RendererAbnormalTermination2.HostedContentType"
    enum="RendererHostedContentType" expires_after="2027-02-07">
  <owner>fdoray@chromium.org</owner>
  <owner>catan-team@chromium.org</owner>
  <summary>
    Recorded when a renderer process exits abnormally. The value describes the
    type of content hosted by the renderer at the time of abnormal exit.
  </summary>
</histogram>

<histogram name="Stability.RendererAbnormalTermination2.{HostedContentType}"
    enum="TerminationStatus" expires_after="2027-02-07">
  <owner>fdoray@chromium.org</owner>
  <owner>catan-team@chromium.org</owner>
  <summary>
    Recorded when a renderer process hosting {HostedContentType} exits
    abnormally. The value describes the exit reason.
  </summary>
  <token key="HostedContentType">
    <variant name="BackgroundFrame"
        summary="an active background frame (but no active foreground frame)"/>
    <variant name="Extension" summary="an extension"/>
    <variant name="ForegroundMainFrame"
        summary="an active foreground main frame"/>
    <variant name="ForegroundSubframe"
        summary="an active foreground subframe (but no active foreground main
                 frame)"/>
    <variant name="InactiveFrame"
        summary="an inactive frame (but no active frame)"/>
    <variant name="NoFrameOrExtension" summary="no frame or extension"/>
  </token>
</histogram>

</histograms>

</histogram-configuration>
