11 Oct 2022 04:48 PM
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?
Thanks,
David
Solved! Go to Solution.
12 Oct 2022 03:56 PM
Check the USQL limitations in the documentation.
https://www.dynatrace.com/support/help/shortlink/usql-info#limitations
I hope it helps.
Best regards,
Mizső
12 Oct 2022 04:45 PM
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,
regards
13 Oct 2022 11:06 AM
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,
David
11 Jul 2023 02:42 PM
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