Skip to content

chore: Add size limit reports on PRs for Cloudflare#20055

Draft
JPeer264 wants to merge 3 commits intodevelopfrom
jp/size-limit-cloudflare
Draft

chore: Add size limit reports on PRs for Cloudflare#20055
JPeer264 wants to merge 3 commits intodevelopfrom
jp/size-limit-cloudflare

Conversation

@JPeer264
Copy link
Copy Markdown
Member

@JPeer264 JPeer264 commented Mar 31, 2026

Cloudflare does have a free tier limit of 3mb: https://developers.cloudflare.com/workers/platform/limits/#worker-size

It would be too bad if we ship something for Cloudflare and by accident ship something which is super costly. For now our size is ~30kb and added a limit to 50kb.

@JPeer264 JPeer264 self-assigned this Mar 31, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 31, 2026

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

Core

  • Support registerTool/registerResource/registerPrompt in MCP integration by betegon in #20071
  • Support embeddings in langchain by nicohrubec in #20017

Deps

  • Bump lodash.template from 4.5.0 to 4.18.1 by dependabot in #20085
  • Bump @xmldom/xmldom from 0.8.3 to 0.8.12 by dependabot in #20066

Other

  • (core, node) Portable Express integration by isaacs in #19928
  • (deno) Add denoRuntimeMetricsIntegration by chargome in #20023
  • (node, bun) Enforce minimum collection interval in runtime metrics integrations by chargome in #20068

Bug Fixes 🐛

  • (aws-serverless) Add timeout to _endSpan forceFlush to prevent Lambda hanging by logaretm in #20064
  • (cloudflare) Ensure every request instruments functions by JPeer264 in #20044
  • (core) Set span.status to error when MCP tool returns JSON-RPC error response by betegon in #20082
  • (gatsby) Fix errorHandler signature to match bundler-plugin-core API by JPeer264 in #20048

Internal Changes 🔧

Core

  • Do not emit spans for chats.create in google-genai by nicohrubec in #19990
  • Unify .do* span ops to gen_ai.generate_content by nicohrubec in #20074
  • Simplify addResponseAttributes in openai integration by nicohrubec in #20013
  • Extract shared endStreamSpan for AI integrations by nicohrubec in #20021
  • Remove provider-specific AI span attributes in favor of gen_ai attributes in sentry conventions by nicohrubec in #20011

Deps

  • Bump mshick/add-pr-comment from dd126dd8c253650d181ad9538d8b4fa218fc31e8 to e7516d74559b5514092f5b096ed29a629a1237c6 by dependabot in #20078
  • Bump getsentry/craft/.github/workflows/changelog-preview.yml from 2.24.1 to 2.25.2 by dependabot in #20081

Other

  • (node) Add node integration tests for Vercel ToolLoopAgent by nicohrubec in #20087
  • (nuxt) Make Nuxt 5 (nightly) E2E optional by s1gr1d in #20113
  • Add size limit reports on PRs for Cloudflare by JPeer264 in #20055
  • Update validate-pr workflow by stephanie-anderson in #20072
  • Remove unused tsconfig-template folder by mydea in #20067

🤖 This preview updates automatically when you update the PR.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 31, 2026

node-overhead report 🧳

Note: This is a synthetic benchmark with a minimal express app and does not necessarily reflect the real-world performance impact in an application.
⚠️ Warning: Base artifact is not the latest one, because the latest workflow run is not done yet. This may lead to incorrect results. Try to re-run all tests to get up to date results.

Scenario Requests/s % of Baseline Prev. Requests/s Change %
GET Baseline 8,859 - 8,876 -0%
GET With Sentry 1,826 21% 1,745 +5%
GET With Sentry (error only) 6,047 68% 6,090 -1%
POST Baseline 1,219 - 1,196 +2%
POST With Sentry 617 51% 600 +3%
POST With Sentry (error only) 1,059 87% 1,073 -1%
MYSQL Baseline 3,205 - 3,311 -3%
MYSQL With Sentry 500 16% 477 +5%
MYSQL With Sentry (error only) 2,596 81% 2,695 -4%

View base workflow run

@JPeer264 JPeer264 force-pushed the jp/size-limit-cloudflare branch 4 times, most recently from fada93f to a10aeaf Compare April 2, 2026 14:53
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

size-limit report 📦

⚠️ Warning: Base artifact is not the latest one, because the latest workflow run is not done yet. This may lead to incorrect results. Try to re-run all tests to get up to date results.

Path Size % Change Change
⛔️ @sentry/browser (max: 26 kB) 26.82 kB +4.61% +1.18 kB 🔺
⛔️ @sentry/browser - with treeshaking flags (max: 24.5 kB) 26.82 kB +11.16% +2.69 kB 🔺
⛔️ @sentry/browser (incl. Tracing) (max: 43 kB) 44.52 kB +5.64% +2.38 kB 🔺
⛔️ @sentry/browser (incl. Tracing, Profiling) (max: 48 kB) 49.31 kB +5.46% +2.55 kB 🔺
⛔️ @sentry/browser (incl. Tracing, Replay) (max: 82 kB) 84.07 kB +3.87% +3.13 kB 🔺
⛔️ @sentry/browser (incl. Tracing, Replay) - with treeshaking flags (max: 75 kB) 84.07 kB +19.15% +13.51 kB 🔺
⛔️ @sentry/browser (incl. Tracing, Replay with Canvas) (max: 87 kB) 89.1 kB +4.03% +3.45 kB 🔺
⛔️ @sentry/browser (incl. Tracing, Replay, Feedback) (max: 99 kB) 102.11 kB +4.29% +4.2 kB 🔺
⛔️ @sentry/browser (incl. Feedback) (max: 43 kB) 45.05 kB +6.22% +2.64 kB 🔺
⛔️ @sentry/browser (incl. sendFeedback) (max: 31 kB) 31.77 kB +4.83% +1.46 kB 🔺
⛔️ @sentry/browser (incl. FeedbackAsync) (max: 36 kB) 37.35 kB +5.88% +2.07 kB 🔺
⛔️ @sentry/browser (incl. Metrics) (max: 27 kB) 27.98 kB +3.8% +1.02 kB 🔺
⛔️ @sentry/browser (incl. Logs) (max: 28 kB) 28.16 kB +3.92% +1.06 kB 🔺
⛔️ @sentry/browser (incl. Metrics & Logs) (max: 28 kB) 28.73 kB +3.46% +960 B 🔺
⛔️ @sentry/react (max: 28 kB) 30.67 kB +11.91% +3.26 kB 🔺
⛔️ @sentry/react (incl. Tracing) (max: 45.1 kB) 48.91 kB +9.98% +4.43 kB 🔺
⛔️ @sentry/vue (max: 31 kB) 31.36 kB +4.28% +1.29 kB 🔺
⛔️ @sentry/vue (incl. Tracing) (max: 45 kB) 46.41 kB +5.38% +2.37 kB 🔺
⛔️ @sentry/svelte (max: 26 kB) 26.85 kB +4.62% +1.19 kB 🔺
⛔️ CDN Bundle (max: 29 kB) 29.32 kB +3.57% +1.01 kB 🔺
⛔️ CDN Bundle (incl. Tracing) (max: 44 kB) 45.11 kB +4.67% +2.01 kB 🔺
⛔️ CDN Bundle (incl. Logs, Metrics) (max: 30 kB) 30.75 kB +3.61% +1.07 kB 🔺
⛔️ CDN Bundle (incl. Tracing, Logs, Metrics) (max: 45 kB) 46.2 kB +4.63% +2.04 kB 🔺
⛔️ CDN Bundle (incl. Replay, Logs, Metrics) (max: 69 kB) 70.9 kB +3.54% +2.42 kB 🔺
⛔️ CDN Bundle (incl. Tracing, Replay) (max: 81 kB) 83.22 kB +4.03% +3.22 kB 🔺
⛔️ CDN Bundle (incl. Tracing, Replay, Logs, Metrics) (max: 82 kB) 84.33 kB +4.06% +3.29 kB 🔺
⛔️ CDN Bundle (incl. Tracing, Replay, Feedback) (max: 86 kB) 88.83 kB +3.85% +3.29 kB 🔺
⛔️ CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) (max: 87 kB) 89.89 kB +3.83% +3.31 kB 🔺
CDN Bundle - uncompressed 81.62 kB -1.26% -1.04 kB 🔽
CDN Bundle (incl. Tracing) - uncompressed 126.38 kB -1.12% -1.43 kB 🔽
CDN Bundle (incl. Logs, Metrics) - uncompressed 85.84 kB -1.11% -962 B 🔽
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 129.74 kB -1.13% -1.47 kB 🔽
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 207.66 kB -1.02% -2.12 kB 🔽
CDN Bundle (incl. Tracing, Replay) - uncompressed 242.39 kB -0.94% -2.29 kB 🔽
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 245.75 kB -0.95% -2.33 kB 🔽
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 255.22 kB -0.93% -2.37 kB 🔽
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 258.57 kB -0.93% -2.41 kB 🔽
⛔️ @sentry/nextjs (client) (max: 48 kB) 51.61 kB +10.08% +4.72 kB 🔺
⛔️ @sentry/sveltekit (client) (max: 44 kB) 44.99 kB +5.57% +2.37 kB 🔺
⛔️ @sentry/node-core (max: 57 kB) 58.59 kB +5.1% +2.84 kB 🔺
⛔️ @sentry/node (max: 176 kB) 182.43 kB +5.61% +9.68 kB 🔺
⛔️ @sentry/node - without tracing (max: 98 kB) 104.34 kB +8.68% +8.33 kB 🔺
⛔️ @sentry/aws-serverless (max: 114 kB) 117.73 kB +4.4% +4.95 kB 🔺
@sentry/cloudflare (withSentry) 373.2 kB added added

View base workflow run

@JPeer264 JPeer264 force-pushed the jp/size-limit-cloudflare branch from 25e1358 to ff50c70 Compare April 7, 2026 08:54
@JPeer264 JPeer264 requested review from Lms24 and s1gr1d April 7, 2026 08:54
@JPeer264 JPeer264 marked this pull request as ready for review April 7, 2026 08:55
Copy link
Copy Markdown
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

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

looks like some other commits made it to this branch 🤔 😅

also, no objections to adding a size limit entry! Just to check: when you add the SDK to cloudflare workers (or other components): Does this roughly equate to the same size? Just wondering if we're missing any dependencies/node_modules data that might make the SDK's footprint larger in reality than the size check shows

@JPeer264
Copy link
Copy Markdown
Member Author

JPeer264 commented Apr 7, 2026

Ok the auto rebase function from GitHub doesn't work as expected :D

Does this roughly equate to the same size? Just wondering if we're missing any dependencies/node_modules data that might make the SDK's footprint larger in reality than the size check shows

Theoretically we are depending on @sentry/core and maybe in the future @sentry/node or @sentry/node-core. Wouldn't that be automatically added here?

There is indeed something missing. I'll try to add it

@JPeer264 JPeer264 force-pushed the jp/size-limit-cloudflare branch from ff50c70 to 8b4317d Compare April 7, 2026 09:45
@JPeer264 JPeer264 removed the request for review from s1gr1d April 7, 2026 14:07
@JPeer264 JPeer264 marked this pull request as draft April 7, 2026 14:08
@JPeer264
Copy link
Copy Markdown
Member Author

JPeer264 commented Apr 7, 2026

Converting to draft, as for Cloudflare we have to use esbuild to show the actual numbers. Unfortunately size-limit only accepts one bundler at a time, which means that the others have to use esbuild as well.

I opened an issue to see if it would be possible to have two bundlers in one size-limit file

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.

2 participants