15 Apr 2019 11:46 AM
I have been trying the following DynaTrace user session query:
Select userid, usersessionid from usersession
adding duration to the above query retrieves the duration for the visually completeness of the useraction.
May be we can fetch the timestamp for the first useraction in the session and subtract it from the last useraction of the session.
Solved! Go to Solution.
15 Apr 2019 12:05 PM
Why are you not using the duration field for usersession?
You should query the usersession.duration, not the useraction.duration (that will be the selected key metric for user actions).
15 Apr 2019 05:52 PM
Thanks Julius that helped
But I can only retrieve 1000 rows
Tried adding LIMIT 10000 to the query
Doesn't help?
Can you please advise?
15 Apr 2019 07:53 PM
This API is not intended to be used to serve as export of all individual sessions. You should use session export for that. It should be used to retrieve aggregated values or individual sessions.
Not sure what you are trying to accomplish, but you can use aggregation functions such as avg and group by clause to get meaningul output. For example - get average session duration by country and city:
select avg(duration),city,country from usersession group by country,city