Skip to content

ref(core): Constrain SdkProcessingMetadata to known keys #15577

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

Closed
wants to merge 2 commits into from

Conversation

AbhiPrasad
Copy link
Member

After working on #15570, I realized we should be more constrained about what we set on SdkProcessingMetadata.

This PR updates the SdkProcessingMetadata type to be more constrained, not allowing any key to be passed to it. This should make sure we are more critical of changes that could lead to increased memory pressure in the SDK (as SdkProcessingMetadata lives alongside the scope).

@AbhiPrasad AbhiPrasad requested a review from a team March 4, 2025 16:53
@AbhiPrasad AbhiPrasad self-assigned this Mar 4, 2025
@AbhiPrasad AbhiPrasad requested review from mydea and chargome and removed request for a team March 4, 2025 16:53
Copy link
Contributor

github-actions bot commented Mar 4, 2025

size-limit report 📦

Path Size % Change Change
@sentry/browser 23.14 KB - -
@sentry/browser - with treeshaking flags 22.92 KB - -
@sentry/browser (incl. Tracing) 36.2 KB -0.02% -5 B 🔽
@sentry/browser (incl. Tracing, Replay) 73.37 KB -0.01% -5 B 🔽
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 66.79 KB -0.01% -6 B 🔽
@sentry/browser (incl. Tracing, Replay with Canvas) 77.99 KB -0.01% -3 B 🔽
@sentry/browser (incl. Tracing, Replay, Feedback) 90.55 KB -0.02% -14 B 🔽
@sentry/browser (incl. Feedback) 40.29 KB - -
@sentry/browser (incl. sendFeedback) 27.77 KB - -
@sentry/browser (incl. FeedbackAsync) 32.57 KB - -
@sentry/react 24.95 KB - -
@sentry/react (incl. Tracing) 38.08 KB -0.01% -3 B 🔽
@sentry/vue 27.37 KB -0.05% -14 B 🔽
@sentry/vue (incl. Tracing) 37.88 KB -0.02% -5 B 🔽
@sentry/svelte 23.17 KB - -
CDN Bundle 24.34 KB - -
CDN Bundle (incl. Tracing) 36.23 KB -0.03% -10 B 🔽
CDN Bundle (incl. Tracing, Replay) 71.25 KB -0.01% -6 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback) 76.42 KB -0.02% -9 B 🔽
CDN Bundle - uncompressed 71.13 KB - -
CDN Bundle (incl. Tracing) - uncompressed 107.5 KB -0.01% -6 B 🔽
CDN Bundle (incl. Tracing, Replay) - uncompressed 218.77 KB -0.01% -6 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 231.34 KB -0.01% -6 B 🔽
@sentry/nextjs (client) 39.27 KB +0.04% +13 B 🔺
@sentry/sveltekit (client) 36.61 KB -0.02% -6 B 🔽
@sentry/node 142.15 KB +0.01% +2 B 🔺
@sentry/node - without tracing 95.58 KB +0.02% +11 B 🔺
@sentry/aws-serverless 119.92 KB -0.01% -3 B 🔽

View base workflow run

Copy link
Member

@chargome chargome left a comment

Choose a reason for hiding this comment

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

Looks good, but would that theoretically be a breaking change?

@AbhiPrasad
Copy link
Member Author

I guess this is a breaking change - but really nobody should be using these APIs other than us.

Maybe we just leave a todo note and come back to this for v10?

@AbhiPrasad
Copy link
Member Author

Will come back to this in v10

@AbhiPrasad AbhiPrasad closed this Mar 17, 2025
@AbhiPrasad AbhiPrasad deleted the abhi-constrain-SdkProcessingMetadata branch March 24, 2025 19:20
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