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: no recording blob urls #1768

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

pauldambra
Copy link
Member

I noticed this while investigating something else... we don't need to do any parsing of blob/object URL bodies in the network recorder. we simply shouldn't be attempting to record their body

Copy link

vercel bot commented Feb 27, 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 27, 2025 10:58am

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

This PR adds functionality to prevent recording the body content of blob URLs in the network recorder.

  • Added isBlobURL function in src/entrypoints/recorder.ts to detect blob URLs (those starting with 'blob:' or having protocol 'blob:')
  • Modified shouldRecordBody function to return false when a URL is identified as a blob URL
  • This optimization avoids unnecessary processing since blob/object URLs are local to the browser and their content cannot be captured

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

@pauldambra pauldambra added the bump minor Bump minor version when this PR gets merged label Feb 27, 2025
Copy link

Size Change: +1.23 kB (+0.04%)

Total Size: 3.32 MB

Filename Size Change
dist/all-external-dependencies.js 218 kB +175 B (+0.08%)
dist/array.full.js 374 kB +175 B (+0.05%)
dist/array.full.no-external.js 372 kB +175 B (+0.05%)
dist/module.full.js 374 kB +175 B (+0.05%)
dist/module.full.no-external.js 372 kB +175 B (+0.05%)
dist/recorder-v2.js 115 kB +175 B (+0.15%)
dist/recorder.js 115 kB +175 B (+0.15%)
ℹ️ View Unchanged
Filename Size
dist/array.full.es5.js 270 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.js 183 kB
dist/module.no-external.js 182 kB
dist/surveys-preview.js 70.1 kB
dist/surveys.js 74.8 kB
dist/tracing-headers.js 1.76 kB
dist/web-vitals.js 10.4 kB

compressed-size-action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bump minor Bump minor version when this PR gets merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant