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

feat(product-analytics): Use sessions table for session duration #21208

Merged
merged 9 commits into from
Mar 28, 2024

Conversation

robbie-c
Copy link
Member

@robbie-c robbie-c commented Mar 28, 2024

Problem

We're doing a slow join over the events table when we can do a fast join over the sessions table!

Changes

Do the fast join over the sessions table! Approach borrowed from the pdi table.

Does this work well for both Cloud and self-hosted?

Yes

How did you test this code?

Added some tests, and existing tests that test session duration still need to pass

Copy link
Collaborator

@mariusandra mariusandra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@robbie-c robbie-c marked this pull request as ready for review March 28, 2024 13:34
@mariusandra
Copy link
Collaborator

I don't know what's up with the tests here. I had the same thing happen #21197 when I made the branch, but this no longer seemed to be an issue after the next commits... 🤔

@robbie-c
Copy link
Member Author

I got the tests green by making session.id a valid alias of session.session_id. It's not particularly satisfying and we should remove this hack, but it does mean that things are working.

@mariusandra mariusandra merged commit c64928d into master Mar 28, 2024
76 checks passed
@mariusandra mariusandra deleted the add-use-sessions-table-for-session-duration branch March 28, 2024 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants