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

feat(vue): Log errors to the console by default #7310

Merged
merged 1 commit into from
Mar 1, 2023

Conversation

Lms24
Copy link
Member

@Lms24 Lms24 commented Mar 1, 2023

As brought up by @cleptric, right now our Vue SDK doesn't log errors occurring in the Vue renderer to the console by default. Users need to manually set logErrors: true to enable logging of errors.

After an internal discussion, we decided to log errors by default. Users can continue to use logErrors to opt out of that.

ref: #1416

Docs PR: getsentry/sentry-docs#6392

@Lms24 Lms24 requested review from a team, mydea, AbhiPrasad and lforst and removed request for a team March 1, 2023 13:35
@Lms24 Lms24 self-assigned this Mar 1, 2023
@Lms24 Lms24 added the Package: vue Issues related to the Sentry Vue SDK label Mar 1, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Mar 1, 2023

Replay SDK metrics 🚀

    Plain +Sentry +Replay
Revision Value Value Diff Ratio Value Diff Ratio
LCP This PR 8a5e0c3 87.70 ms 76.81 ms -10.89 ms -12.42 % 82.41 ms -5.29 ms -6.03 %
Previous 3ba8e0b 61.25 ms 73.45 ms +12.20 ms +19.92 % 72.64 ms +11.39 ms +18.60 %
CLS This PR 8a5e0c3 0.00 ms 0.00 ms 0.00 ms 0.00 % 0.25 ms +0.25 ms +5395.74 %
Previous 3ba8e0b 0.00 ms 0.00 ms 0.00 ms 0.00 % 0.26 ms +0.26 ms +5553.44 %
CPU This PR 8a5e0c3 25.97 % 26.29 % +0.33 pp +1.27 % 44.57 % +18.61 pp +71.67 %
Previous 3ba8e0b 17.48 % 19.51 % +2.03 pp +11.61 % 36.08 % +18.59 pp +106.36 %
JS heap avg This PR 8a5e0c3 3.47 MB 5.81 MB +2.34 MB +67.51 % 10.01 MB +6.55 MB +188.91 %
Previous 3ba8e0b 3.54 MB 6.91 MB +3.37 MB +95.28 % 11.18 MB +7.64 MB +216.09 %
JS heap max This PR 8a5e0c3 3.89 MB 7.65 MB +3.75 MB +96.49 % 13.87 MB +9.98 MB +256.58 %
Previous 3ba8e0b 3.89 MB 8.29 MB +4.4 MB +113.13 % 14.31 MB +10.42 MB +267.77 %
netTx This PR 8a5e0c3 0 B 228.09 kB +228.09 kB n/a 106.82 kB +106.82 kB n/a
Previous 3ba8e0b 0 B 360.35 kB +360.35 kB n/a 105.73 kB +105.73 kB n/a
netRx This PR 8a5e0c3 17.17 kB 18.18 kB +1.02 kB +5.91 % 17.08 kB -84 B -0.49 %
Previous 3ba8e0b 18.13 kB 18.35 kB +222 B +1.22 % 18.46 kB +332 B +1.83 %
netCount This PR 8a5e0c3 1 2 +1 +100.00 % 5 +4 +400.00 %
Previous 3ba8e0b 1 2 +1 +100.00 % 4 +3 +300.00 %
netTime This PR 8a5e0c3 681.36 ms 804.14 ms +122.78 ms +18.02 % 793.97 ms +112.60 ms +16.53 %
Previous 3ba8e0b 601.86 ms 692.68 ms +90.82 ms +15.09 % 669.72 ms +67.85 ms +11.27 %

Previous results on branch: develop

RevisionLCPCLSCPUJS heap avgJS heap maxnetTxnetRxnetCountnetTime
3ba8e0b+11.39 ms+0.26 ms+18.59 pp+7.64 MB+10.42 MB+105.73 kB+332 B+3+67.85 ms
dbd7a81+98.37 ms-0.00 ms+6.68 pp+1.64 MB+1.82 MB+2.23 kB+41 B+1+124.71 ms
dbd7a81+86.19 ms-0.00 ms+6.77 pp+1.58 MB+1.67 MB+2.23 kB+41 B+1+87.99 ms
67b0684+84.74 ms-0.00 ms+7.38 pp+1.7 MB+1.81 MB+2.23 kB+41 B+1+85.52 ms
4b95c04+57.56 ms-0.00 ms+7.94 pp+920.88 kB+1.05 MB+2.21 kB+41 B+1+90.32 ms
e60cd02+56.25 ms-0.00 ms+6.32 pp+927.44 kB+1.06 MB+2.21 kB+41 B+1+117.55 ms
e25c067+48.34 ms+0.00 ms+5.59 pp+926.37 kB+1.05 MB+2.22 kB+41 B+1+65.23 ms
b1b249b+43.88 ms+0.00 ms+4.80 pp+937.99 kB+1.05 MB+2.22 kB+41 B+1+111.56 ms
12e34d4+28.57 ms+0.00 ms+5.77 pp+930.12 kB+1.04 MB+2.26 kB+41 B+1+109.67 ms
c46c56c+65.45 ms-0.00 ms+5.38 pp+930.26 kB+1.07 MB+2.21 kB+41 B+1+91.29 ms

*) pp - percentage points - an absolute difference between two percentages.
Last updated: Wed, 01 Mar 2023 14:57:28 GMT

@Lms24 Lms24 merged commit eedd811 into develop Mar 1, 2023
@Lms24 Lms24 deleted the lms/vue-log-errors-default-true branch March 1, 2023 15:38
Lms24 added a commit to getsentry/sentry-docs that referenced this pull request Mar 2, 2023
Following getsentry/sentry-javascript#7310 where we flipped the default value of `logErrors` from `false` to `true`, this PR updates the docs accordingly and removes the now obsolete warning regarding the SDK suppressing error logs by default.
s1gr1d added a commit that referenced this pull request Jan 10, 2025
Removes `logError` and always re-throws the error when it's not handled
by the user.

PR for v8 (without removing `logError`):
#14943

Logging the error has been a problem in the past already (see
#7310). By just
re-throwing the error we don't mess around with the initial message and
stacktrace.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Package: vue Issues related to the Sentry Vue SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants