amplitude/Amplitude-TypeScript

session_id not reset after delayed event upload

awinograd opened this issue · 2 comments

We have many instances where sessions are artificially extended by days when an event in the previous session is not sent initially, but instead is uploaded at a later date (i.e. the client event time and client upload time have a large delta).

Here are two events where client event time is days before client upload time and we end up seeing multi-day length sessions in amplitude since subsequent events use the session_id from the event with a much earlier client event time.

https://app.amplitude.com/analytics/oui/project/259398/search/amplitude_id%3D794709358302?sessionHandle=YyZclBH_YyZclB9_LkIXnbe_%2FVG_02dee5b5-a459-4de9-8511-583d2f81007f&eventId=7076bd22-e705-4a99-ab2b-38b21b257e5a
https://app.amplitude.com/analytics/oui/project/259398/search/amplitude_id%3D849722019916?sessionHandle=Y415zYD_Y415zYD_MXXYRBM_%2FVG_671a6a0a-c51e-429e-9278-d2bf1d46599d&eventId=388982b2-4256-435e-84ab-2586cb4a9898

Expected Behavior

If two subsequent events have client event time > session timeout then the later events should receive a new session_id.

Current Behavior

Events currently receive a session_id from a much earlier session.

Possible Solution

Steps to Reproduce

  1. Disable device network connectivity
  2. Log an event to emplitude
  3. Come back in 30 minutes (or longer)
  4. Reconnect to the internet and record more events

Environment

  • JS SDK Version: react-native 0.6.1
  • Installation Method: yarn
  • Browser and Version: n/a (issue has occurred on iOS and android)

@awinograd - I see the version you are using is 0.6.1 which was released in Nov '22. Have you tried with the latest version to see if that has the same issue?

@awinograd closing this ticket for now but please feel free to reopen the ticket once you try with the new version and still see the issue