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

chore: add posthog built rrweb #1770

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

pauldambra
Copy link
Member

Adds the option of loading the posthog built rrweb instead of rrweb one

Doesn't use it anywhere. But will make it available for testing

Copy link

vercel bot commented Feb 28, 2025

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

Name Status Preview Updated (UTC)
posthog-js ✅ Ready (Inspect) Visit Preview Feb 28, 2025 0:51am

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

Added PostHog's custom-built rrweb packages as development dependencies and created a new entry point for session recording functionality.

  • Added @posthog/rrweb-plugin-console-record, @posthog/rrweb-record, and @posthog/rrweb-types at version 0.0.9 in package.json
  • Created new entry point in /src/entrypoints/posthog-recorder.ts that imports from PostHog's custom rrweb packages
  • Implemented extensive network recording functionality in the new file with observers for performance entries, XHR, and fetch requests
  • Added backward compatibility by attaching functions to both window.__PosthogExtensions__ and directly to window
  • Included temporary network recording implementation that will eventually be replaced by official rrweb code

2 file(s) reviewed, 4 comment(s)
Edit PR Review Bot Settings | Greptile

Copy link

Size Change: 0 B

Total Size: 3.54 MB

ℹ️ View Unchanged
Filename Size
dist/all-external-dependencies.js 218 kB
dist/array.full.es5.js 271 kB
dist/array.full.js 374 kB
dist/array.full.no-external.js 372 kB
dist/array.js 183 kB
dist/array.no-external.js 182 kB
dist/customizations.full.js 14 kB
dist/dead-clicks-autocapture.js 14.5 kB
dist/exception-autocapture.js 9.51 kB
dist/external-scripts-loader.js 2.64 kB
dist/main.js 184 kB
dist/module.full.js 374 kB
dist/module.full.no-external.js 372 kB
dist/module.js 183 kB
dist/module.no-external.js 182 kB
dist/posthog-recorder.js 212 kB
dist/recorder-v2.js 115 kB
dist/recorder.js 115 kB
dist/surveys-preview.js 70.3 kB
dist/surveys.js 75 kB
dist/tracing-headers.js 1.76 kB
dist/web-vitals.js 10.4 kB

compressed-size-action

@pauldambra
Copy link
Member Author

you can see here why we can't switch everyone over quite yet to the unpatched recorder

image

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.

1 participant