Skip to content

feat(nextjs): Add request data to all edge-capable functionalities #9636

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

Merged
merged 17 commits into from
Nov 23, 2023

Conversation

lforst
Copy link
Contributor

@lforst lforst commented Nov 22, 2023

This PR adds RequestData capabilities to the Vercel Edge SDK. We do not include the capabilities by default until the next major because suddenly including it may leak PII.

Copy link
Contributor

github-actions bot commented Nov 22, 2023

size-limit report 📦

Path Size
@sentry/browser (incl. Tracing, Replay) - Webpack (gzipped) 66.02 KB (0%)
@sentry/browser (incl. Tracing, Replay) - Webpack with treeshaking flags (gzipped) 56.21 KB (0%)
@sentry/browser (incl. Tracing) - Webpack (gzipped) 31.19 KB (0%)
@sentry/browser - Webpack (gzipped) 21.4 KB (0%)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (gzipped) 62.65 KB (0%)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (gzipped) 29.47 KB (0%)
@sentry/browser - ES6 CDN Bundle (gzipped) 21.55 KB (0%)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (minified & uncompressed) 197.27 KB (0%)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (minified & uncompressed) 89.15 KB (0%)
@sentry/browser - ES6 CDN Bundle (minified & uncompressed) 64.12 KB (0%)
@sentry/browser (incl. Tracing) - ES5 CDN Bundle (gzipped) 32.12 KB (0%)
@sentry/react (incl. Tracing, Replay) - Webpack (gzipped) 66.43 KB (0%)
@sentry/react - Webpack (gzipped) 21.45 KB (0%)
@sentry/nextjs Client (incl. Tracing, Replay) - Webpack (gzipped) 83.16 KB (0%)
@sentry/nextjs Client - Webpack (gzipped) 48.32 KB (0%)
@sentry-internal/feedback - Webpack (gzipped) 16.19 KB (0%)

Base automatically changed from lforst-hoist-requestdataintegration-to-core to develop November 22, 2023 16:10
@lforst lforst marked this pull request as ready for review November 22, 2023 16:22
@lforst lforst requested a review from whitep4nth3r November 23, 2023 08:56
@lforst
Copy link
Contributor Author

lforst commented Nov 23, 2023

@AbhiPrasad it seems like we can't use the TS built-in Request, Response etc. types because it requires the DOM TS types extension so I started vendoring them: 5672479

@lforst lforst requested a review from AbhiPrasad November 23, 2023 08:57
@whitep4nth3r
Copy link

Is this specifically for Vercel? Just wondering how this would play nicely with other platforms such as Netlify.

@lforst
Copy link
Contributor Author

lforst commented Nov 23, 2023

Is this specifically for Vercel? Just wondering how this would play nicely with other platforms such as Netlify.

@whitep4nth3r This will currently pretty much only apply to the Next.js SDK but for all hosting platforms. We just named the vercel-edge SDK horribly. (shaking fist angrily) wintercg would have probably been a better name.

@AbhiPrasad
Copy link
Member

We just named the vercel-edge SDK horribly

Actually no we didn't because vercel edge has async local storage support, while this is not part of the wintercg spec. So something like cloudflare would not work with the vercel-edge sdk.

I think core is our wintercg compatible sdk,

@lforst
Copy link
Contributor Author

lforst commented Nov 23, 2023

We just named the vercel-edge SDK horribly

Actually no we didn't because vercel edge has async local storage support, while this is not part of the wintercg spec. So something like cloudflare would not work with the vercel-edge sdk.

I think core is our wintercg compatible sdk,

Right. I keep forgetting this. Sorry!

@lforst lforst merged commit eb2d726 into develop Nov 23, 2023
@lforst lforst deleted the lforst-request-data-in-edge branch November 23, 2023 15:58
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.

3 participants