Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

ref(utils): Keep non-enumerable properties in dropUndefinedKeys. #13840

Merged
merged 1 commit into from
Oct 2, 2024

Conversation

onurtemizkan
Copy link
Collaborator

@onurtemizkan onurtemizkan commented Oct 1, 2024

Bumped into this while working on #13841.

Internally assigned non-enumerable object properties such as __sentry_skip_normalization__ and __sentry_override_normalization_depth__ were getting pruned by dropUndefinedKeys.

These are required by Redux and Pinia integrations to assign states to the event context.

@onurtemizkan onurtemizkan force-pushed the onur/dropundefinedkeys-non-enumerable branch from ef30c45 to 5b69594 Compare October 1, 2024 13:29
Copy link
Contributor

github-actions bot commented Oct 1, 2024

size-limit report 📦

Path Size % Change Change
@sentry/browser 22.64 KB +0.02% +3 B 🔺
@sentry/browser - with treeshaking flags 21.42 KB +0.02% +3 B 🔺
@sentry/browser (incl. Tracing) 34.87 KB +0.02% +4 B 🔺
@sentry/browser (incl. Tracing, Replay) 71.37 KB +0.01% +3 B 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 61.8 KB +0.01% +4 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 75.72 KB +0.01% +1 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback) 88.49 KB +0.01% +1 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback, metrics) 90.37 KB +0.01% +3 B 🔺
@sentry/browser (incl. metrics) 26.91 KB +0.02% +3 B 🔺
@sentry/browser (incl. Feedback) 39.78 KB +0.01% +3 B 🔺
@sentry/browser (incl. sendFeedback) 27.3 KB +0.02% +4 B 🔺
@sentry/browser (incl. FeedbackAsync) 32.08 KB +0.01% +1 B 🔺
@sentry/react 25.39 KB +0.02% +3 B 🔺
@sentry/react (incl. Tracing) 37.85 KB +0.01% +3 B 🔺
@sentry/vue 26.8 KB +0.01% +1 B 🔺
@sentry/vue (incl. Tracing) 36.76 KB +0.01% +3 B 🔺
@sentry/svelte 22.77 KB +0.02% +3 B 🔺
CDN Bundle 23.95 KB +0.03% +6 B 🔺
CDN Bundle (incl. Tracing) 36.64 KB +0.02% +5 B 🔺
CDN Bundle (incl. Tracing, Replay) 71.14 KB +0.01% +4 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 76.45 KB +0.01% +5 B 🔺
CDN Bundle - uncompressed 70.17 KB +0.03% +15 B 🔺
CDN Bundle (incl. Tracing) - uncompressed 108.63 KB +0.02% +15 B 🔺
CDN Bundle (incl. Tracing, Replay) - uncompressed 220.53 KB +0.01% +15 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 233.74 KB +0.01% +15 B 🔺
@sentry/nextjs (client) 37.81 KB +0.02% +5 B 🔺
@sentry/sveltekit (client) 35.44 KB +0.01% +3 B 🔺
@sentry/node 125.13 KB - -
@sentry/node - without tracing 93.58 KB +0.01% +6 B 🔺
@sentry/aws-serverless 103.28 KB -0.01% -1 B 🔽

View base workflow run

@onurtemizkan onurtemizkan force-pushed the onur/dropundefinedkeys-non-enumerable branch from 5b69594 to 1e9a4ab Compare October 2, 2024 09:11
@onurtemizkan onurtemizkan marked this pull request as ready for review October 2, 2024 09:17
@onurtemizkan onurtemizkan requested a review from lforst October 2, 2024 09:17
@lforst lforst merged commit a6348cc into develop Oct 2, 2024
149 checks passed
@lforst lforst deleted the onur/dropundefinedkeys-non-enumerable branch October 2, 2024 11:20
s1gr1d pushed a commit that referenced this pull request Oct 15, 2024
Resolves: #13279
Depends on: #13840 
[Sample
Event](https://sentry-sdks.sentry.io/issues/5939879614/?project=5429219&query=is%3Aunresolved%20issue.priority%3A%5Bhigh%2C%20medium%5D&referrer=issue-stream&sort=date&statsPeriod=1h&stream_index=0)

Docs PR: getsentry/sentry-docs#11516
 

Adds a Pinia plugin with a feature set similar to the Redux integration.

- Attaches Pinia state as an attachment to the event (`true` by default)
- Provides `actionTransformer` and `stateTransformer` to the user for
potentially required PII modifications.
- Adds breadcrumbs for Pinia actions
- Assigns Pinia state to event contexts.
billyvg pushed a commit that referenced this pull request Oct 17, 2024
Resolves: #13279
Depends on: #13840 
[Sample
Event](https://sentry-sdks.sentry.io/issues/5939879614/?project=5429219&query=is%3Aunresolved%20issue.priority%3A%5Bhigh%2C%20medium%5D&referrer=issue-stream&sort=date&statsPeriod=1h&stream_index=0)

Docs PR: getsentry/sentry-docs#11516
 

Adds a Pinia plugin with a feature set similar to the Redux integration.

- Attaches Pinia state as an attachment to the event (`true` by default)
- Provides `actionTransformer` and `stateTransformer` to the user for
potentially required PII modifications.
- Adds breadcrumbs for Pinia actions
- Assigns Pinia state to event contexts.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants