posthog-js
posthog-js copied to clipboard
Limit session length
Right now session length is hardcoded to 24h
https://github.com/PostHog/posthog-js/blob/ec6fb944c466ac39bad2a21ac6eb39c4e904b53e/src/sessionid.ts#L13
We can probably make this much shorter by default (let's say 4 hours?) but also allow it to be set as a configuration.
Very long sessions may cause issues during the playback due to the amount of CPU and RAM consumed.
Tickets https://posthoghelp.zendesk.com/agent/tickets/11727
This could affect pricing so let's think before doing this change. An option is to make it configurable and keep it 24h by default.