PostHog / posthog-js

Send usage data from your web app or site to PostHog, with autocapture.
https://posthog.com/docs/libraries/js
Other
303 stars 126 forks source link

fix: rotate session id proactively #1512

Open pauldambra opened 3 weeks ago

pauldambra commented 3 weeks ago

We reviewed the session idle timeout code and some of the naming was off, so this changes the names

We also periodically get reports that some events sneak through after many tens of hours of idle activity before the session id rotates. This is very surprising from reading the code but is clearly happening, let's make it (even more) impossible by:


What I'm worried about here after talking it through with @robbie-c in person is that the code makes sense but we don't know it will fix the problem since we don't know what the problem is 🤔

vercel[bot] commented 3 weeks ago

The latest updates on your projects. Learn more about Vercel for Git ↗ī¸Ž

Name Status Preview Updated (UTC)
posthog-js ✅ Ready (Inspect) Visit Preview Nov 28, 2024 0:16am
github-actions[bot] commented 3 weeks ago

Size Change: +2 kB (+0.06%)

Total Size: 3.18 MB

Filename Size Change
dist/array.full.es5.js 257 kB +234 B (+0.09%)
dist/array.full.js 361 kB +196 B (+0.05%)
dist/array.full.no-external.js 360 kB +196 B (+0.05%)
dist/array.js 175 kB +196 B (+0.11%)
dist/array.no-external.js 174 kB +196 B (+0.11%)
dist/main.js 176 kB +196 B (+0.11%)
dist/module.full.js 361 kB +196 B (+0.05%)
dist/module.full.no-external.js 360 kB +196 B (+0.05%)
dist/module.js 175 kB +196 B (+0.11%)
dist/module.no-external.js 174 kB +196 B (+0.11%)
ℹī¸ View Unchanged | Filename | Size | | :--- | :---: | | `dist/all-external-dependencies.js` | 206 kB | | `dist/customizations.full.js` | 12.2 kB | | `dist/dead-clicks-autocapture.js` | 14.3 kB | | `dist/exception-autocapture.js` | 9.37 kB | | `dist/external-scripts-loader.js` | 2.29 kB | | `dist/recorder-v2.js` | 115 kB | | `dist/recorder.js` | 115 kB | | `dist/surveys-preview.js` | 57.6 kB | | `dist/surveys.js` | 63.2 kB | | `dist/tracing-headers.js` | 1.75 kB | | `dist/web-vitals.js` | 10.3 kB |

compressed-size-action

posthog-bot commented 2 weeks ago

This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the stale label – otherwise this will be closed in another week.

posthog-bot commented 1 week ago

This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the stale label – otherwise this will be closed in another week.

marandaneto commented 1 week ago

What I'm worried about here after talking it through with @robbie-c in person is that the code makes sense but we don't know it will fix the problem since we don't know what the problem is 🤔

I agree but, we know the problem exists, we cannot reproduce it, so every small interaction may lead to fixing it. We can always roll back if it worsens it.