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.
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).
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