<!--
{
  "documentType" : "article",
  "framework" : "MetricKit",
  "identifier" : "/documentation/MetricKit/MXMetricManager-API",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "MXMetricManager API"
}
-->

# MXMetricManager API

Measure app performance and diagnostics using MXMetricManager and related types.

## Topics

### Metric and diagnostic reports

[`class MXMetricManager`](/documentation/MetricKit/MXMetricManager)

The shared object that registers you to receive metrics, creates logs for custom metrics, and gives access to past reports.

[`class MXMetricPayload`](/documentation/MetricKit/MXMetricPayload)

An object that encapsulates a daily metrics report.

[`class MXDiagnosticPayload`](/documentation/MetricKit/MXDiagnosticPayload)

An object that encapsulates a diagnostic report.

[`protocol MXMetricManagerSubscriber`](/documentation/MetricKit/MXMetricManagerSubscriber)

A protocol defining a method for receiving a daily metrics report.

### Battery and resource metrics

[`class MXCellularConditionMetric`](/documentation/MetricKit/MXCellularConditionMetric)

An object representing metrics about the condition of the cellular network.

[`class MXCPUMetric`](/documentation/MetricKit/MXCPUMetric)

An object representing metrics about the use of the CPU.

[`class MXDisplayMetric`](/documentation/MetricKit/MXDisplayMetric)

An object representing metrics about the power used to display the app on the screen.

[`class MXGPUMetric`](/documentation/MetricKit/MXGPUMetric)

An object representing metrics about the use of the GPU.

[`class MXLocationActivityMetric`](/documentation/MetricKit/MXLocationActivityMetric)

An object representing metrics about the use of location-tracking features of a device.

[`class MXNetworkTransferMetric`](/documentation/MetricKit/MXNetworkTransferMetric)

An object representing metrics about network transfers.

### App performance metrics

[`class MXAppRunTimeMetric`](/documentation/MetricKit/MXAppRunTimeMetric)

An object representing metrics about the amount of time the app is active.

[`class MXAppExitMetric`](/documentation/MetricKit/MXAppExitMetric)

An object representing metrics about the types of foreground and background app exits.

[`class MXForegroundExitData`](/documentation/MetricKit/MXForegroundExitData)

An object representing counts for the different types of foreground app exits.

[`class MXBackgroundExitData`](/documentation/MetricKit/MXBackgroundExitData)

An object representing counts for the different types of background app exits.

[`class MXMemoryMetric`](/documentation/MetricKit/MXMemoryMetric)

An object representing metrics about the app’s memory use.

### Responsiveness metrics

[`class MXAnimationMetric`](/documentation/MetricKit/MXAnimationMetric)

An object representing metrics about the responsiveness of animation in the app.

[`class MXAppLaunchMetric`](/documentation/MetricKit/MXAppLaunchMetric)

An object representing metrics about app launch time.

[`class MXAppResponsivenessMetric`](/documentation/MetricKit/MXAppResponsivenessMetric)

An object representing metrics about the responsiveness of the app to user interaction.

[`struct MXLaunchTaskID`](/documentation/MetricKit/MXLaunchTaskID)

The task identifier to track launch measurements.

### Disk metrics

[`class MXDiskIOMetric`](/documentation/MetricKit/MXDiskIOMetric)

An object representing metrics about disk usage.

[`class MXDiskSpaceUsageMetric`](/documentation/MetricKit/MXDiskSpaceUsageMetric)

An object representing metrics about your app’s disk space usage.

### Performance diagnostics

[`class MXAppLaunchDiagnostic`](/documentation/MetricKit/MXAppLaunchDiagnostic)

A diagnostic subclass that encapsulates app launch diagnostic reports.

[`class MXCPUExceptionDiagnostic`](/documentation/MetricKit/MXCPUExceptionDiagnostic)

An object representing a diagnostic report for a fatal or nonfatal CPU exception.

[`class MXCrashDiagnostic`](/documentation/MetricKit/MXCrashDiagnostic)

An object representing a diagnostic report for an app crash.

[`class MXHangDiagnostic`](/documentation/MetricKit/MXHangDiagnostic)

An object representing a diagnostic report for an app that is too busy to handle user input responsively.

[`class MXDiskWriteExceptionDiagnostic`](/documentation/MetricKit/MXDiskWriteExceptionDiagnostic)

An object representing a diagnostic report for a disk write exception.

### Signpost metrics

[`class MXSignpostMetric`](/documentation/MetricKit/MXSignpostMetric)

An object representing a custom metric.

[`class MXSignpostIntervalData`](/documentation/MetricKit/MXSignpostIntervalData)

A data object representing the captured data for a custom metric.

[`#define MXSignpostEventEmit(log, event_id, name, ...)`](/documentation/MetricKit/MXSignpostEventEmit)

Post a custom metric event to a metric kit log.

[`#define MXSignpostAnimationIntervalBegin(log, event_id, name, ...)`](/documentation/MetricKit/MXSignpostAnimationIntervalBegin)

[`#define MXSignpostIntervalBegin(log, event_id, name, ...)`](/documentation/MetricKit/MXSignpostIntervalBegin)

Post the start time of a custom metric event to a metric kit log.

[`#define MXSignpostIntervalEnd(log, event_id, name, ...)`](/documentation/MetricKit/MXSignpostIntervalEnd)

Post the end time of a custom metric event to a metric kit log.

[`func mxSignpost(OSSignpostType, dso: UnsafeRawPointer, log: OSLog, name: StaticString, signpostID: OSSignpostID, StaticString, [any CVarArg])`](/documentation/MetricKit/mxSignpost(_:dso:log:name:signpostID:_:_:))

Posts a single custom metric, the start time of a custom metric, or the end time of a custom metric to the log system.

[`func mxSignpostAnimationIntervalBegin(dso: UnsafeRawPointer, log: OSLog, name: StaticString, signpostID: OSSignpostID, StaticString, [any CVarArg])`](/documentation/MetricKit/mxSignpostAnimationIntervalBegin(dso:log:name:signpostID:_:_:))

Posts the start time of an animation interval to the log system.

### Supporting types

[`class MXCallStackTree`](/documentation/MetricKit/MXCallStackTree)

An object representing the call stack for an exception.

[`class MXMetaData`](/documentation/MetricKit/MXMetaData)

An object containing system-level information about the device.

[`class MXAverage`](/documentation/MetricKit/MXAverage)

A unit of measure for an average.

[`class MXHistogram`](/documentation/MetricKit/MXHistogram)

An object representing a histogram of data values of the same type of unit.

[`class MXHistogramBucket`](/documentation/MetricKit/MXHistogramBucket)

An object representing a bucket of data in a histogram.

[`class MXDiagnostic`](/documentation/MetricKit/MXDiagnostic)

An abstract data class for a diagnostic.

[`class MXMetric`](/documentation/MetricKit/MXMetric)

An abstract data class for a metric.

[`struct MXError`](/documentation/MetricKit/MXError)

Error domain for error handling of app metrics.

[`enum Code`](/documentation/MetricKit/MXError/Code)

Error codes for error values from app metrics.

[`let MXErrorDomain: String`](/documentation/MetricKit/MXErrorDomain)

Error domain for error values from app metrics.

[`class MXCrashDiagnosticObjectiveCExceptionReason`](/documentation/MetricKit/MXCrashDiagnosticObjectiveCExceptionReason)

An object that represents the exception reason for an uncaught ObjC exception.

[`class MXSignpostRecord`](/documentation/MetricKit/MXSignpostRecord)

An object representing the record for a signpost interval or event.

[`class MXUnitAveragePixelLuminance`](/documentation/MetricKit/MXUnitAveragePixelLuminance)

A unit of measure of pixel luminosity on an OLED display.

[`class MXUnitSignalBars`](/documentation/MetricKit/MXUnitSignalBars)

A unit of measure for the number of bars of cellular network connectivity.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)