As per the Documentation here the user session is ended after 10 min of inactivity (In the Mobile App).
this was confirmer and working fine, but the problem is the original session is kept LIVE even 30mn (and some time hours) after the end and the start of the second session,
This is a big problem because we are using the session export functionality which export only the ended sessions, so the statistics become a little no accurate.
Did you noticed this?
Thanks and have a good day.
Solved! Go to Solution.
See footnote 1 on exactly that page:
for technical reasons an ended session can appear as live for up to 35 minutes.
Thanks Harp for your replay,
Yes the documentation is clear and was shared with the customer before.
Anyway, do you know if those 35mn are customizable or not?
It seems the given time is not customizable. Any chance to try the Dynatrace API function?
The 35 minute live timeout duration is a technical limitation and not customizable. Ending a session on mobile by API does not change that. Live sessions are in a different storage than closed sessions. Once a session is persisted as closed nothing can be added. Thus we have to be absolutely sure that there are no more events that have not yet been sent from mobile agent as event creation order is not the same as sending order. There can still be previous data arriving after the end session event arrived at cluster. This and other reasons require that 35 minutes timeout on cluster side.
In this situation, what could be the use of Dynatrace API except testing something in the Dev/UAT environments?
@Babar_Qayyum I'm not sure if I understood the question correctly. The endVisist() API can be used to end a session, e.g. if a user logged out. It transition to a new user session on the device and does not have an impact on the live session timeout.
Thank you for your comments. So, the endVisist() API is useful if someone is interested in ending the session for the sake of session count but in reality, the session will continue up to 35 minutes (so we can not export the session data up to that time).
Once the session will be finished while using the endVisist() API and the user opens a new session, in this case, all the actions should be part of the new session. Correct?
If this is the fact, 35 minutes live timeout should not affect because once we forced the session to end then there should not be any previous/remaining event outside the finished session.
Is my understanding correct?
Yes, endVisit() ends the current session and creates a new one. Already running lifecycle/user actions have a grace period to end and still belong to the session where they were started. everything started after the call to endVisit() will be part of the new session.
What is the grace period to end the lifecycle/user actions belonging to the finished sessions made by calling to endVisit()?
thats agent internal and does not really matter - if an open action does not close within the 9 min max action duration it is discarded. This has no impact on the live session timeout on cluster, which starts when last event from a session has been received. You can't tell how long it takes for a live session to be marked as closed, but it is guaranteed that it does not take longer than 35 minutes.
Does it mean that we can export the session data without waiting for 35 minutes (in case we do not care about pending events/actions) for finished sessions made by calling to endVisit()?
Or exporting the session data is only possible when the sessions will be closed/timeout on the cluster after 35 minutes?
I'm sorry, but my main domain is the agent side, so I need to find someone to jump in here who knows more about session export.
Sessions will be exported once they are closed on the cluster, not earlier. There’s no way to change that behavior.