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: Add trpcMiddleware back to serverside SDKs #11374

Merged
merged 5 commits into from
Apr 4, 2024
Merged

Conversation

lforst
Copy link
Member

@lforst lforst commented Apr 2, 2024

Adds back the trpcMiddleware we accidentally removed when removing the old @sentry/node package.

@mydea
Copy link
Member

mydea commented Apr 2, 2024

(not in this PR, but we should prob. add an E2E test for this...)

Copy link

codecov bot commented Apr 2, 2024

Bundle Report

Changes will increase total bundle size by 4.76kB ⬆️

Bundle name Size Change
@sentry/types-cjs 35 bytes 0 bytes
@sentry/types-esm 35 bytes 0 bytes
@sentry/utils-cjs 178.16kB 595 bytes ⬇️
@sentry/utils-esm 173.58kB 598 bytes ⬇️
@sentry/vercel-edge-cjs 18.28kB 46 bytes ⬆️
@sentry/core-cjs 242.22kB 1.78kB ⬆️
@sentry-internal/integration-shims-esm 2.99kB 0 bytes
@sentry/core-esm 238.57kB 1.75kB ⬆️
@sentry/vercel-edge-esm 16.14kB 16 bytes ⬆️
@sentry-internal/feedback-cjs 65.81kB 0 bytes
@sentry-internal/integration-shims-cjs 3.65kB 0 bytes
@sentry-internal/replay-cjs 306.35kB 0 bytes
@sentry/node-cjs 336.23kB 734 bytes ⬇️
@sentry/opentelemetry-cjs 70.22kB 1.77kB ⬆️
@sentry/node-esm 332.8kB 764 bytes ⬇️
@sentry-internal/replay-canvas-cjs 29.51kB 0 bytes
@sentry-internal/node-integration-tests-cjs 1.04kB 0 bytes
@sentry/bun-cjs 13.55kB 46 bytes ⬆️
@sentry/bun-esm 10.07kB 16 bytes ⬆️
@sentry/google-cloud-serverless-cjs 23.05kB 46 bytes ⬆️
@sentry/browser-esm 104.53kB 0 bytes
@sentry/svelte-cjs 13.84kB 0 bytes
@sentry/google-cloud-serverless-esm 19.18kB 16 bytes ⬆️
@sentry/wasm-cjs 5.2kB 0 bytes
@sentry/browser-cjs 107.36kB 0 bytes
@sentry/vue-esm 18.85kB 0 bytes
@sentry/astro-cjs 27.13kB 0 bytes
@sentry/sveltekit-cjs 69.4kB 92 bytes ⬆️
@sentry/gatsby-cjs 905 bytes 0 bytes
@sentry-internal/replay-esm 306.46kB 0 bytes
@sentry/gatsby-esm 385 bytes 0 bytes
@sentry/aws-serverless-cjs 14.62kB 0 bytes
@sentry/react-cjs 45.04kB 0 bytes
@sentry-internal/tracing-cjs 108.01kB 0 bytes
@sentry/sveltekit-esm 61.11kB 32 bytes ⬆️
@sentry-internal/node-integration-tests-esm 888 bytes 0 bytes
@sentry/nextjs-cjs 20.52kB 0 bytes
@sentry-internal/replay-canvas-esm 29.43kB 0 bytes
@sentry/vue-cjs 20.19kB 0 bytes
@sentry/nextjs-esm 20.02kB 0 bytes
@sentry/svelte-esm 12.72kB 0 bytes
@sentry/remix-esm 48.24kB 16 bytes ⬆️
@sentry/wasm-esm 4.85kB 0 bytes
@sentry/react-esm 41.18kB 0 bytes
@sentry/remix-cjs 53.66kB 46 bytes ⬆️
@sentry/profiling-node-cjs 25.5kB 0 bytes
@sentry/profiling-node-esm 25.52kB 0 bytes
@sentry-internal/feedback-esm 65.5kB 0 bytes
@sentry/opentelemetry-esm 69.19kB 1.79kB ⬆️
@sentry-internal/tracing-esm 107.26kB 0 bytes
@sentry/astro-esm 23.39kB 0 bytes

@lforst
Copy link
Member Author

lforst commented Apr 2, 2024

(not in this PR, but we should prob. add an E2E test for this...)

@mydea Absolutely. I wanna do it in this PR actually. That's why it's still in draft.

},
},
span => {
let maybePromiseResult;
Copy link
Member

Choose a reason for hiding this comment

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

l: can we rewrite this to use handleCallbackErrors?

Copy link
Member Author

Choose a reason for hiding this comment

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

It will very much not reduce the code here by much, if at all, because we need to inspect maybePromiseResult.

@lforst lforst requested review from mydea, Lms24, AbhiPrasad and s1gr1d April 2, 2024 14:05
@lforst lforst marked this pull request as ready for review April 2, 2024 14:06
Copy link
Contributor

github-actions bot commented Apr 2, 2024

size-limit report 📦

Path Size
@sentry/browser (incl. Tracing, Replay, Feedback) 76.4 KB (+0.01% 🔺)
@sentry/browser (incl. Tracing, Replay) 67.66 KB (+0.01% 🔺)
@sentry/browser (incl. Tracing, Replay with Canvas) 71.5 KB (+0.01% 🔺)
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 61.22 KB (+0.01% 🔺)
@sentry/browser (incl. Tracing) 32.34 KB (0%)
@sentry/browser (incl. browserTracingIntegration) 32.34 KB (0%)
@sentry/browser (incl. feedbackIntegration) 31.37 KB (0%)
@sentry/browser (incl. feedbackModalIntegration) 31.49 KB (0%)
@sentry/browser (incl. feedbackScreenshotIntegration) 31.49 KB (0%)
@sentry/browser (incl. sendFeedback) 27.46 KB (0%)
@sentry/browser 22.61 KB (0%)
CDN Bundle (incl. Tracing, Replay, Feedback) 71.39 KB (0%)
CDN Bundle (incl. Tracing, Replay) 66.14 KB (0%)
CDN Bundle (incl. Tracing) 32.46 KB (0%)
CDN Bundle 23.86 KB (0%)
CDN Bundle (incl. Tracing, Replay) - uncompressed 206.41 KB (0%)
CDN Bundle (incl. Tracing) - uncompressed 97.06 KB (0%)
CDN Bundle - uncompressed 70.55 KB (0%)
@sentry/react (incl. Tracing, Replay) 67.64 KB (+0.01% 🔺)
@sentry/react 22.64 KB (0%)

lforst added a commit that referenced this pull request Apr 3, 2024
The `trpcMiddleware` export will move from `Handlers` to a top level export in v8. This is more or less backporting #11374 to v7.
@lforst lforst merged commit 3980730 into develop Apr 4, 2024
94 checks passed
@lforst lforst deleted the lforst-add-back-trpc branch April 4, 2024 07:08
cadesalaberry pushed a commit to cadesalaberry/sentry-javascript that referenced this pull request Apr 19, 2024
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