Skip to main content
Early access Since 1.5.0 Calculate the total time spent in the given state from a state aggregate. If you need to interpolate missing values across time bucket boundaries, use interpolated_duration_in.

Samples

Create a test table that tracks when a system switches between starting, running, and error states. Query the table for the time spent in the running state. If you prefer to see the result in seconds, EXTRACT the epoch from the returned result.
Returns:
The syntax is:

Returns