Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: session idle timestamp correction #1428

Merged
merged 2 commits into from
Sep 23, 2024
Merged

Conversation

pauldambra
Copy link
Member

@pauldambra pauldambra commented Sep 22, 2024

In https://posthoghelp.zendesk.com/agent/tickets/16379 we see a session that emits zero events for > 10hrs and so doesn't trigger idle detection

when the session returns we correctly flushed only the session idle event and started a new session

but!

the session idle event has as its timestamp the point it was detected making for an 10hr+ session with 10 hours of inactivity

Since we know the threshold and the time of last activity we can correct the timestamp of the event before emitting it


tested locally and can see sessionIdle not being emitted at the time it was captured

Screenshot 2024-09-23 at 09 50 38

Copy link

vercel bot commented Sep 22, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
posthog-js ✅ Ready (Inspect) Visit Preview Sep 22, 2024 3:12pm

Copy link

github-actions bot commented Sep 22, 2024

Size Change: +556 B (+0.05%)

Total Size: 1.22 MB

Filename Size Change
dist/array.full.js 349 kB +139 B (+0.04%)
dist/array.js 164 kB +139 B (+0.08%)
dist/main.js 165 kB +139 B (+0.08%)
dist/module.js 164 kB +139 B (+0.08%)
ℹ️ View Unchanged
Filename Size
dist/exception-autocapture.js 10.5 kB
dist/recorder-v2.js 111 kB
dist/recorder.js 111 kB
dist/surveys-preview.js 59.8 kB
dist/surveys.js 66 kB
dist/tracing-headers.js 8.36 kB
dist/web-vitals.js 10.3 kB

compressed-size-action

@pauldambra pauldambra requested a review from a team September 22, 2024 15:08
@pauldambra pauldambra added the bump patch Bump patch version when this PR gets merged label Sep 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bump patch Bump patch version when this PR gets merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants