Skip to content

feat(v8/nextjs): Remove usage of class integrations #11182

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 4 commits into from
Mar 19, 2024

Conversation

AbhiPrasad
Copy link
Member

In order to proceed with removing Sentry.Integrations.X as per #8844, there's still some places to clean up.

This does conflict with #11016, but not sure when that merges in, so opening this in the meantime to unblock the integrations cleanup work. if we think the OTEL nextjs work will merge in sooner then the next 1-2 days, I'm happy to leave this alone for now!

@AbhiPrasad AbhiPrasad requested review from lforst and a team March 18, 2024 21:15
@AbhiPrasad AbhiPrasad self-assigned this Mar 18, 2024
@AbhiPrasad AbhiPrasad requested review from s1gr1d and removed request for a team March 18, 2024 21:15
@AbhiPrasad
Copy link
Member Author

Nvm TS hates this because of microsoft/TypeScript#5711

src/index.server.ts, src/index.client.ts, src/client/index.ts, src/server/index.ts, src/edge/index.ts, src/config/index.ts → build/cjs...
src/server/httpIntegration.ts:13:14 - error TS4023: Exported variable 'httpIntegration' has or is using name 'HttpIntegrationOptions' from external module "/Users/abhijeetprasad/workspace/sentry-javascript/packages/node/build/types/integrations/http" but cannot be named.

13 export const httpIntegration = defineIntegration(customHttpIntegration);
                ~~~~~~~~~~~~~~~

src/server/onUncaughtExceptionIntegration.ts:13:14 - error TS4023: Exported variable 'onUncaughtExceptionIntegration' has or is using name 'OnUncaughtExceptionOptions' from external module "/Users/abhijeetprasad/workspace/sentry-javascript/packages/node/build/types/integrations/onuncaughtexception" but cannot be named.

13 export const onUncaughtExceptionIntegration = defineIntegration(customOnUncaughtException);

So we are just blocked by #11016 - moving to draft

@AbhiPrasad AbhiPrasad marked this pull request as draft March 18, 2024 22:22
@lforst
Copy link
Contributor

lforst commented Mar 19, 2024

You could just do what I did here to unblock: https://github.com/getsentry/sentry-javascript/pull/11016/files#diff-f1f5019ea464cd8f4b65691d18e38e74c4170ee5f8b5c143f1d7e0b420cd3b64

@AbhiPrasad AbhiPrasad marked this pull request as ready for review March 19, 2024 14:21
@AbhiPrasad
Copy link
Member Author

Great idea @lforst - changed!

Copy link
Contributor

github-actions bot commented Mar 19, 2024

size-limit report 📦

Path Size
@sentry/browser (incl. Tracing, Replay, Feedback) 80.71 KB (added)
@sentry/browser (incl. Tracing, Replay) 72.06 KB (added)
@sentry/browser (incl. Tracing, Replay with Canvas) 75.86 KB (added)
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 65.62 KB (added)
@sentry/browser (incl. Tracing) 36.66 KB (added)
@sentry/browser (incl. browserTracingIntegration) 36.66 KB (added)
@sentry/browser (incl. feedbackIntegration) 31.33 KB (added)
@sentry/browser (incl. feedbackModalIntegration) 31.45 KB (added)
@sentry/browser (incl. feedbackScreenshotIntegration) 31.46 KB (added)
@sentry/browser (incl. sendFeedback) 27.41 KB (added)
@sentry/browser 22.58 KB (added)
CDN Bundle (incl. Tracing, Replay, Feedback) 75.05 KB (added)
CDN Bundle (incl. Tracing, Replay) 69.9 KB (added)
CDN Bundle (incl. Tracing) 36.25 KB (added)
CDN Bundle 23.95 KB (added)
CDN Bundle (incl. Tracing, Replay) - uncompressed 219.54 KB (added)
CDN Bundle (incl. Tracing) - uncompressed 109.49 KB (added)
CDN Bundle - uncompressed 70.96 KB (added)
@sentry/react (incl. Tracing, Replay) 72.05 KB (added)
@sentry/react 22.61 KB (added)

@AbhiPrasad AbhiPrasad merged commit ad9d6ab into develop Mar 19, 2024
@AbhiPrasad AbhiPrasad deleted the abhi-nextjs-class-integration-remove branch March 19, 2024 19:10
cadesalaberry pushed a commit to cadesalaberry/sentry-javascript that referenced this pull request Apr 19, 2024
In order to proceed with removing `Sentry.Integrations.X` as per
getsentry#8844, there's
still some places to clean up.

This does conflict with
getsentry#11016, but not sure
when that merges in, so opening this in the meantime to unblock the
integrations cleanup work. if we think the OTEL nextjs work will merge
in sooner then the next 1-2 days, I'm happy to leave this alone for now!
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