<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MetricKit",
  "identifier" : "/documentation/MetricKit/MetricReport/stateEntries",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "MetricKit"
    ],
    "preciseIdentifier" : "s:9MetricKit0A6ReportV12stateEntriesSayAC10StateEntryVGvp"
  },
  "title" : "stateEntries"
}
-->

# stateEntries

The state entries in this metric report, populated when state reporting is enabled.

```
let stateEntries: [MetricReport.StateEntry]
```

## Discussion

`stateEntries` is only populated when the [`MetricManager`](/documentation/MetricKit/MetricManager) was initialized with [`init(enabledStateReportingDomains:)`](/documentation/MetricKit/MetricManager/init(enabledStateReportingDomains:)). Each [`MetricReport.StateEntry`](/documentation/MetricKit/MetricReport/StateEntry) contains metric values aggregated while the app was in a specific state, scoped to a specific [`MetricManager.ReportedState`](/documentation/MetricKit/MetricManager/ReportedState).

Only a subset of metrics appear in state entries, including hang time, hitch time, app termination counts, signpost intervals, location activity time, and app runtime metrics. CPU time, memory, network, disk I/O, GPU, app launch, and disk space metrics appear only in [`intervalEntries`](/documentation/MetricKit/MetricReport/intervalEntries).

Use `byStateReportingDomain` on the collection to group entries by domain:

```swift
let byDomain = report.stateEntries.byStateReportingDomain
if let sessionEntries = byDomain[StateReportingDomain(rawValue: "com.example.app.session")] {
    for entry in sessionEntries {
        print(entry.state.label, entry.values)
    }
}
```

---

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)