Showing results for 
Show  only  | Search instead for 
Did you mean: 

Counting simultaneous user sessions

Frequent Guest

Hi there,


We're looking into reworking one of our applications that's been in Dynatrace for a while now, and there's an important metric we need to report for load analysis and assessment; the number of simultaneously live user sessions at a given period.


At any point in time we can read a value from the Session List; put a filter by "Live: Yes" and we can see a count straight away. What would be the best way of (probably using a USQL construct) plotting that value over time so we can check for peaks and troughs in loads?





DynaMight Leader
DynaMight Leader

Hi @David_Robinson 


Check the USQL limitations in the documentation.


  • Only closed user sessions can be queried. Live user sessions aren't taken into account. ☹️


I hope it helps.


Best regards,



Dynatrace Community RockStar 2024, Certified Dynatrace Professional

Hi David,


as @Mizső mentioned, taking the USQL road, implies that by definition you are querying session that are already closed (since the live session aren't subject to query via USQL).


Still If you want to test the USQL Query that won't give you live session, chunked by days and hours, here it is:


SELECT day(startTime), HOUR(startTime), count(*) FROM usersession WHERE userType = "REAL_USER" AND useraction.application = "youApplication" AND GROUP BY day(startTime), HOUR(startTime)

On the other side from the data explorer you can use this metric:


Which will give you the estimated active (live) sessions dashboarded in a timeseries fashion way and the values downloadables in CSV from the three dotted button (highlighted in red):




Let me know if this helped you and take care of yourself,



Frequent Guest

Hi all,


Thanks for the replies. The data explorer solution seems closest to what we're trying to report.


My phrasing was probably bad; the comparison with live sessions was intended more informative than prescriptive. A more formal construct might have been "how many user sessions were live at x time - i.e. how many closed sessions had a start time before x and a finish time after x - and can that be plotted as a line graph as x changes"; depending on how estimated the estimated results are in the data explorer solution, that might do it.


Thanks again,


Hi David,

In addition without having to use metric, actually to the classical view the only easy thing you can do is to apply markdown via your Dashboard and redirect to the native supported USQL window where you can use LIVE
session filter and see over time. 

Live session :


Ended session via USQL : example with tracking one user's session 



We can just hope it could it be used through NextGen plartform (Grail) via notebook with fetch events!
DQL compared to SQL and more | Dynatrace Docs

Featured Posts