You could reproduce the same logic that I believe Blue Prism implements. It's basically that a session goes into a Warning state when the process has been on the same stage for more than 5 minutes (or other time if it's changed from the default). Last I checked, changing the default warning time doesn't work in stages, so the default time should be a fine assumption.
I would just take all the session log fields and then build your UI or w/e you're making to indicate sessions that have been on the same stage for more than a certain amount of time. That really should be configurable in the UI rather than being a value stored at the database level, since in my opinion some users will not care about that while others will.
------------------------------
Dave Morris
Cano Ai
Atlanta, GA
------------------------------
Dave Morris, 3Ci at Southern Company