posthog-js icon indicating copy to clipboard operation
posthog-js copied to clipboard

Limit session length

Open marandaneto opened this issue 1 year ago • 1 comments

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

marandaneto avatar Mar 18 '24 08:03 marandaneto

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.

marandaneto avatar Mar 18 '24 09:03 marandaneto