Skip to content

Conversation

@logaretm
Copy link
Collaborator

@logaretm logaretm commented Nov 14, 2025

Fixes #18203

Problem

When using normalizeDepth: 10 with captureConsoleIntegration enabled, Vue VNodes in console arguments would trigger recursive warning spam. Accessing VNode properties during normalization would trigger Vue's reactive getters, which emit console warnings. These warnings would then be captured and normalized again, creating a recursive loop that could generate hundreds of warnings.

Note that this only happens in dev mode

Solution

Changed isVueViewModel() to detect Vue 3 VNodes (__v_isVNode: true) in addition to Vue 2/3 ViewModels. VNodes are now identified early in the normalization process and stringified as [VueVNode] before their properties are accessed, preventing the recursive warning loop.

Some of the properties on the VNode can also be reactive, so it can incorrectly add those to a watchEffect or a render function reactive dependencies when accessed by the normalizer.

Changes

  • packages/core/src/utils/is.ts: Added __v_isVNode check to isVueViewModel().
  • packages/core/src/utils/normalize.ts: Distinguish VNodes from ViewModels in output ([VueVNode] vs [VueViewModel]).
  • Tests: Added comprehensive unit tests for Vue object detection and integration test that verifies no property access occurs during VNode normalization.

I couldn't reproduce this exactly in a test with a real vue component, but verified it fixes the reproduction example.

The before and after of the captured logs:

Before:

CleanShot 2025-11-14 at 15 46 30

After:

CleanShot 2025-11-14 at 15 45 15

As a Vue developer I don't think the loss of information here would help debug anything.

@linear
Copy link

linear bot commented Nov 14, 2025

@github-actions
Copy link
Contributor

github-actions bot commented Nov 14, 2025

size-limit report 📦

Path Size % Change Change
@sentry/browser 24.63 kB +0.09% +21 B 🔺
@sentry/browser - with treeshaking flags 23.13 kB +0.17% +37 B 🔺
@sentry/browser (incl. Tracing) 41.28 kB +0.07% +25 B 🔺
@sentry/browser (incl. Tracing, Profiling) 45.57 kB +0.08% +33 B 🔺
@sentry/browser (incl. Tracing, Replay) 79.73 kB +0.02% +9 B 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 69.44 kB +0.07% +42 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 84.43 kB +0.02% +14 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback) 96.65 kB +0.07% +62 B 🔺
@sentry/browser (incl. Feedback) 41.28 kB +0.03% +11 B 🔺
@sentry/browser (incl. sendFeedback) 29.29 kB +0.05% +12 B 🔺
@sentry/browser (incl. FeedbackAsync) 34.21 kB +0.05% +16 B 🔺
@sentry/react 26.32 kB +0.13% +33 B 🔺
@sentry/react (incl. Tracing) 43.23 kB +0.02% +5 B 🔺
@sentry/vue 29.11 kB +0.11% +30 B 🔺
@sentry/vue (incl. Tracing) 43.08 kB +0.12% +49 B 🔺
@sentry/svelte 24.65 kB +0.14% +34 B 🔺
CDN Bundle 26.95 kB +0.16% +42 B 🔺
CDN Bundle (incl. Tracing) 41.83 kB +0.06% +24 B 🔺
CDN Bundle (incl. Tracing, Replay) 78.38 kB +0.07% +54 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 83.84 kB +0.05% +38 B 🔺
CDN Bundle - uncompressed 78.92 kB +0.11% +81 B 🔺
CDN Bundle (incl. Tracing) - uncompressed 124.08 kB +0.07% +79 B 🔺
CDN Bundle (incl. Tracing, Replay) - uncompressed 240.11 kB +0.04% +79 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 252.87 kB +0.04% +79 B 🔺
@sentry/nextjs (client) 45.37 kB +0.07% +28 B 🔺
@sentry/sveltekit (client) 41.67 kB +0.06% +22 B 🔺
@sentry/node-core 50.9 kB +0.08% +40 B 🔺
@sentry/node 158.1 kB +0.02% +20 B 🔺
@sentry/node - without tracing 92.78 kB +0.05% +41 B 🔺
@sentry/aws-serverless 106.53 kB +0.03% +23 B 🔺

View base workflow run

@github-actions
Copy link
Contributor

github-actions bot commented Nov 14, 2025

node-overhead report 🧳

Note: This is a synthetic benchmark with a minimal express app and does not necessarily reflect the real-world performance impact in an application.

Scenario Requests/s % of Baseline Prev. Requests/s Change %
GET Baseline 8,622 - 11,316 -24%
GET With Sentry 1,335 15% 1,654 -19%
GET With Sentry (error only) 6,088 71% 7,684 -21%
POST Baseline 1,169 - 1,188 -2%
POST With Sentry 493 42% 573 -14%
POST With Sentry (error only) 1,039 89% 1,040 -0%
MYSQL Baseline 3,225 - 4,059 -21%
MYSQL With Sentry 417 13% 562 -26%
MYSQL With Sentry (error only) 2,664 83% 3,308 -19%

View base workflow run

Copy link
Member

@s1gr1d s1gr1d left a comment

Choose a reason for hiding this comment

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

Nice fix!

return !!(
typeof wat === 'object' &&
wat !== null &&
((wat as VueViewModel).__isVue || (wat as VueViewModel)._isVue || (wat as { __v_isVNode?: boolean }).__v_isVNode)
Copy link
Member

Choose a reason for hiding this comment

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

l/m: Could we add a comment here explaining a little bit what we're doing?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yea absolutely

@logaretm logaretm merged commit fcf35f6 into develop Nov 14, 2025
195 checks passed
@logaretm logaretm deleted the awad/js-1162-nuxtvue-high-normalizedepth-causes-warning-spam branch November 14, 2025 20:42
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.

Nuxt/Vue - High normalizeDepth causes warning spam

4 participants