---
title: states
framework: metrickit
role: symbol
role_heading: Instance Property
path: metrickit/diagnosticreport/environment-swift.struct/states
---

# states

All states that were active leading up to this diagnostic event.

## Declaration

```swift
let states: [MetricManager.ReportedState]
```

## Mentioned in

Analyzing app performance with MetricKit Monitoring app performance with MetricKit

## Discussion

Discussion This array contains all the StateReporting states that occurred before the diagnostic event. The array may be empty if no StateReporting context was active.
