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

ref(core)!: Remove backwards compatible SentryCarrier type #14697

Open
wants to merge 11 commits into
base: v9
Choose a base branch
from

Conversation

mydea
Copy link
Member

@mydea mydea commented Dec 13, 2024

I do not really think this is breaking or has any impact on any user code, but to be on the safe side, we can remove this in v9.

The one actual breaking thing is to also move the encodePolyfill / decodePolyfill code to the versioned carrier - this was before still on the global, making this a bit harder than necessary. In v9, this will have to be set on the versioned carrier the same as other things - cc @krystofwoldrich

@mydea mydea requested a review from Lms24 December 13, 2024 10:01
@mydea mydea self-assigned this Dec 13, 2024
Copy link
Contributor

github-actions bot commented Dec 13, 2024

size-limit report 📦

Path Size % Change Change
@sentry/browser 23.24 KB -0.21% -50 B 🔽
@sentry/browser - with treeshaking flags 21.94 KB -0.08% -17 B 🔽
@sentry/browser (incl. Tracing) 35.74 KB -0.15% -52 B 🔽
@sentry/browser (incl. Tracing, Replay) 72.99 KB -0.05% -36 B 🔽
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 63.4 KB -0.02% -9 B 🔽
@sentry/browser (incl. Tracing, Replay with Canvas) 77.4 KB -0.06% -47 B 🔽
@sentry/browser (incl. Tracing, Replay, Feedback) 89.79 KB -0.06% -47 B 🔽
@sentry/browser (incl. Feedback) 40 KB -0.09% -33 B 🔽
@sentry/browser (incl. sendFeedback) 27.85 KB -0.16% -45 B 🔽
@sentry/browser (incl. FeedbackAsync) 32.64 KB -0.13% -41 B 🔽
@sentry/react 25.94 KB -0.07% -17 B 🔽
@sentry/react (incl. Tracing) 38.58 KB -0.05% -17 B 🔽
@sentry/vue 27.45 KB -0.14% -39 B 🔽
@sentry/vue (incl. Tracing) 37.59 KB -0.09% -32 B 🔽
@sentry/svelte 23.4 KB -0.21% -49 B 🔽
CDN Bundle 24.4 KB -0.1% -23 B 🔽
CDN Bundle (incl. Tracing) 37.44 KB -0.06% -21 B 🔽
CDN Bundle (incl. Tracing, Replay) 72.52 KB -0.03% -22 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback) 77.91 KB -0.04% -26 B 🔽
CDN Bundle - uncompressed 71.68 KB -0.09% -66 B 🔽
CDN Bundle (incl. Tracing) - uncompressed 110.98 KB -0.06% -66 B 🔽
CDN Bundle (incl. Tracing, Replay) - uncompressed 225.03 KB -0.03% -66 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 238.25 KB -0.03% -66 B 🔽
@sentry/nextjs (client) 38.85 KB -0.08% -28 B 🔽
@sentry/sveltekit (client) 36.26 KB -0.08% -27 B 🔽
@sentry/node 162.73 KB -0.02% -24 B 🔽
@sentry/node - without tracing 98.87 KB -0.02% -18 B 🔽
@sentry/aws-serverless 126.61 KB -0.02% -23 B 🔽

View base workflow run

import { SDK_VERSION } from './version';

interface SentryCarrier {
Copy link
Member Author

Choose a reason for hiding this comment

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

this type was basically duplicated here - this comes from the days of core vs utils separation, I believe 😬

export function getGlobalSingleton<T>(name: keyof SentryCarrier, creator: () => T, obj?: unknown): T {
const gbl = (obj || GLOBAL_OBJ) as InternalGlobal;
const __SENTRY__ = (gbl.__SENTRY__ = gbl.__SENTRY__ || {});
export function getGlobalSingleton<Prop extends keyof SentryCarrier>(
Copy link
Member Author

Choose a reason for hiding this comment

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

Made this more type safe and actually inferring types correctly for passed in stuff!

mydea and others added 7 commits December 13, 2024 12:51
In order for us to have size-limit comparison etc, we need to ensure CI
runs on v8 & v9 branches too.
With this PR, the default value for the `spans` option in the
`httpIntegration` is changed to `false`, if `skipOpenTelemetrySetup:
true` is configured. This is what you'd expect as a user, you do not
want Sentry to register any OTEL instrumentation and emit any spans in
this scenario.

Closes #14675
I do not really think this is breaking or has any impact on any user code, but to be on the safe side, we can remove this in v9.
@mydea mydea force-pushed the fn/cleanup-old-carrier-code branch from 95a71c1 to 30d32a5 Compare December 13, 2024 11:53
Copy link

codecov bot commented Dec 13, 2024

❌ 12 Tests Failed:

Tests completed Failed Passed Skipped
690 12 678 300
View the top 3 failed tests by shortest run time
loader/onLoad/customInit/test.ts always calls onLoad init correctly
Stack Traces | 0.446s run time
test.ts:9:11 always calls onLoad init correctly
loader/onLoad/onLoadLate/test.ts late onLoad call is handled
Stack Traces | 30s run time
test.ts:6:11 late onLoad call is handled
loader/noOnLoad/pageloadTransaction/test.ts should create a pageload transaction
Stack Traces | 30s run time
test.ts:10:11 should create a pageload transaction

To view more test analytics, go to the Test Analytics Dashboard
📢 Thoughts on this report? Let us know!

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