# Tracking Tracking measures the time an entity spends in each value of a discrete field: the duration of a refund in `pending`, the interval of a transaction between two steps, the elapsed time of an account under block. Tracking is a capability of the field, not a separate kind of metric. When a [field is marked as trackable](/en/events/event_fields/#track-time-in-value), the platform starts recording every change of value per entity and provisions two derived fields, available like any other field of the event type: | Derived field | Type | Content | |---------------|------|---------| | `Previous ` | dimension | value the entity was in before the change | | `Time in previous ` | measure | duration of the most recently closed period | ## Closed periods A closed period is measured with an ordinary metric: use an **Average**, **Maximum**, **Minimum**, or **Sum** aggregation over the `Time in previous ` field and group by the `Previous ` dimension. The resulting metric expresses the latency of the process: the average time spent in each value and the longest period observed. ## Open periods An open period has not closed yet: the entity remains in the value. The platform samples this set periodically and offers two measures: | Measure | Content | |---------|---------| | Open count | number of entities currently in the value | | Open time | age of the oldest entity still open | The tracked field must have a fixed set of values (list or boolean), because each value is followed separately. Without a filter on the tracked field, the metric follows every value, final ones included, whose count grows until the data expires. Filter the tracked field to follow only the relevant values. ### Restrict by open time An open metric accepts an additional restriction, **Tracking scope**, which limits the count to entities open for longer than a given time. The restriction distinguishes a stuck process from a slow entity. Without it, **Open count** includes entities that have just arrived at the value. With `more than 2 days`, the measure counts only the entities that exceeded the expected deadline. The value must be lower than the tracking retention configured on the field. Below the given threshold, **Open time** records zero instead of the real age of the oldest entity. The alert threshold is not part of the metric: it is configured as a condition on the [monitor](/en/behavioral/monitors/open_tracking/). ### Restrictions on open metrics * An open measure supports only one grouping dimension. To break it down by more than one dimension, create one metric per dimension. * The chosen dimension must be among the **breakdown dimensions** configured on the trackable field. * An open measure cannot share a metric with ordinary measures. * Breakdown dimensions added later apply only to entities entering the value from that moment on. Those already open remain without the breakdown until they change value.