4. Check Total Sequence Duration

Duration Length checks how long a sequence (a series of actions) took, from its first matched record to its final matched record. Use it to find sequences completed within a time limit or taking at least a specified amount of time.

3 min readProduct documentationzinzu user guide

Build the Query

  1. Drag the required events onto the canvas and connect them in order.
  2. Add Duration Length from System Defined Events.
  3. Place it immediately before End, following either the final named event or Any.
  4. Choose the comparison and enter the duration in milliseconds.
Example:
Start → Request Received → Processing Started → Response Sent → Duration Length ≤ 2,500 ms → End
Query example: Request Received → Processing Started → Response Sent, within 2.5 seconds.

Using Any: You can place Any directly before Duration Length to capture activity after a named event.

Example:
Start → Login Failed → Any → Duration Length ≥ 300,000 ms → End
Query example: Capture activity after a failed login lasting at least five minutes.

Any captures subsequent records until the EventOwner’s queried records end or the sequence record limit is reached. Duration Length then checks the time from the sequence’s first matched record to its last captured record.

The condition is checked when capture closes. It does not stop capture when the condition first becomes true.

If Any captures no additional records, the sequence duration is 0 ms.

How It Works

After the required events match for the same EventOwner, zinzu checks the elapsed time between the first and final matched records.

With Duration Length ≤ 2,500 ms (2.5 seconds):

  • 2 seconds: The sequence completes.
  • Exactly 2.5 seconds: The sequence also completes.
  • 3 seconds: The sequence is marked incomplete, even though the actions occurred in the correct order.

When Duration Length follows a named event, the check happens immediately when that event matches. When it follows Any, the check happens when capture closes. Duration Length does not consume an additional record.

When to Use It

Check service response times
Find Request Received → Processing Started → Response Sent sequences completed within 2.5 seconds. Set Duration Length to ≤ 2,500 ms.
Query example: Service response completed within 2.5 seconds.
Find slow purchases
Find Product Viewed → Any → Payment Completed sequences taking at least 30 minutes. Set Duration Length to ≥ 1,800,000 ms. Inspect the captured activity between the two named events to understand what happened along the way.
Query example: Find purchases taking at least 30 minutes.
Measure support resolution time
Find Ticket Opened → Any → Ticket Resolved sequences completed within 24 hours. Set Duration Length to ≤ 86,400,000 ms.
Query example: Find support tickets resolved within 24 hours.

Note: Duration uses timestamps in your data, not the time zinzu takes to run the query. 1 second = 1,000 milliseconds.

Next: Submit the query and view results.

Continue reading5. Duration branches
Search documentation · Esc to close
Open original image ↗