-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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: write recording summary events #15245
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoop that was fast! Lots of changes needed but hopefully these are useful comments after the first draft.
keypressCount += 1 | ||
} | ||
} | ||
if (!!eventSummary.data.href?.trim().length && url === undefined) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I never know if this is the case but isn't the missing ? after trim meaning that it could throw if there is no href?
Also why not use truthiness and keep it simple :D
if (!!eventSummary.data.href?.trim().length && url === undefined) { | |
if (!url && eventSummary.data.href?.trim()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can investigate aggregations with
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking better!
e12a1a9
to
beff2fb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To me this looks solid now 👍
@hazzadous I don't think the failing plugin server functional tests here are due to my change https://github.com/PostHog/posthog/actions/runs/4884989857/jobs/8719065927 Should I ignore? |
Problem see #15200 (comment) When we store session recording events we materialize a lot of information using the snapshot data column. We'll soon not be storing the snapshot data so won't be able to use that to materialize that information, so we need to capture it earlier in the pipeline. Since this is only used for searching for/summarizing recordings we don't need to store every event. Changes We'll push a summary event to a new kafka topic during ingestion. ClickHouse can ingest from that topic into an aggregating merge tree table. So that we store (in theory, although not in practice) only one row per session. add config to turn this on and off by team in plugin server add code behind that to write session recording summary events to a new topic in kafka add ClickHouse tables to ingest and aggregate those summary events
Problem
see #15200 (comment)
When we store session recording events we materialize a lot of information using the snapshot data column.
We'll soon not be storing the snapshot data so won't be able to use that to materialize that information, so we need to capture it earlier in the pipeline. Since this is only used for searching for/summarizing recordings we don't need to store every event.
Changes
We'll push a summary event to a new kafka topic during ingestion. ClickHouse can ingest from that topic into an aggregating merge tree table. So that we store (in theory, although not in practice) only one row per session.
How did you test this code?
some developer tests and running it locally