---
title: stateEntries
framework: metrickit
role: symbol
role_heading: Instance Property
path: metrickit/metricreport/stateentries
---

# stateEntries

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

## Declaration

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

## Mentioned in

Monitoring app performance with MetricKit Analyzing app performance with MetricKit

## Discussion

Discussion stateEntries is only populated when the MetricManager was initialized with init(enabledStateReportingDomains:). Each MetricReport.StateEntry contains metric values aggregated while the app was in a specific state, scoped to a specific MetricManager.ReportedState. Only a subset of metrics appear in state entries, including hang time, hitch time, scroll 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. Use byStateReportingDomain on the collection to group entries by domain: 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)     } }

## See Also

### Metric data

- [intervalEntries](metrickit/metricreport/intervalentries.md)
- [encodingFormatKey](metrickit/metricreport/encodingformatkey.md)
- [MetricReport.EncodingFormat](metrickit/metricreport/encodingformat.md)
