Session recording support for webgpu-backed canvas
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 39.9k
- Forks
- 3.4k
- Avg merge
- 6h 51m
- Merged PRs (30d)
- 232
Description
Feature request
Is your feature request related to a problem?
Currently in session recording, canvas elements that are backed by 2d or webgl work fine. However, canvas elements backed by webgpu do not show up in the session replay, I believe because webgpu does not support preserveDrawingBuffer(https://github.com/gpuweb/gpuweb/issues/2743).
Describe the solution you'd like
There are other ways to record webgpu-backed canvas elements.
- The most straightforward one, from my research, is rrweb's webrtc plugin (see https://github.com/rrweb-io/rrweb/tree/master/packages/plugins/rrweb-plugin-canvas-webrtc-record). I believe this also already exists in the posthog rrweb fork.
- The other alternative is to use a different mechanism (e.g. https://github.com/gpuweb/gpuweb/pull/2905) to just capture the canvas at like 15fps.
Additional context
N/A
Debug info
- [x] PostHog Cloud, Debug information: [please copy/paste from https://us.posthog.com/settings/project-details#variables]
Session: https://us.posthog.com/project/sTMFPsFhdP1Ssg/replay/019ddab4-c4a9-7756-a1ce-f208ae9786fd?t=1595
Admin: http://go/adminOrgUS/019b0f0c-b503-0000-4899-984f86c489f0 (project ID 329248)
- [ ] PostHog Hobby self-hosted with `docker compose`, version/commit: [please provide]
- [ ] PostHog self-hosted with Kubernetes (deprecated, see [`Sunsetting Kubernetes support`](https://posthog.com/blog/sunsetting-helm-support-posthog)), version/commit: [please provide]
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the rrweb canvas WebRTC recording plugin and the existing PostHog rrweb fork referenced in the issue, then compare that approach with the proposed WebGPU capture mechanism. Done means WebGPU-backed canvas elements appear correctly in session replay, with the chosen capture approach validated against the reported session.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, observability
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100