Skip to content

Conversation

@mydea
Copy link
Member

@mydea mydea commented Feb 14, 2023

Currently, the dedupe integration will never drop non-error events, but it will still consider them as _previousEvent. Thus, if we have e.g. a sequence of events like this:

  • error 1
  • transaction
  • error 1

It will capture error 1 twice.

This PR fixes this so we only consider error events for deduping.

This may be related to #7147, although TBH I am not sure if this would really account for that many consecutive errors... 🤔

@mydea mydea added Type: Bug Package: browser Issues related to the Sentry Browser SDK labels Feb 14, 2023
@mydea mydea requested review from AbhiPrasad and lforst February 14, 2023 09:41
@mydea mydea self-assigned this Feb 14, 2023
@mydea mydea mentioned this pull request Feb 14, 2023
3 tasks
@mydea mydea changed the title fix(browser): Ensure dedupe integration ignores non-errors fix(integration): Ensure dedupe integration ignores non-errors Feb 14, 2023
const eventProcessor: EventProcessor = currentEvent => {
// We want to ignore any non-error type events, e.g. transactions or replays
// These should never be deduped, and also not be compared against as _previousEvent.
if (currentEvent.type) {
Copy link
Contributor

Choose a reason for hiding this comment

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

In these cases it's so weird that error events don't have a type....

Copy link
Member Author

Choose a reason for hiding this comment

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

jup, backwards compatibility I guess 😅

@github-actions
Copy link
Contributor

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 20.09 KB (+0.05% 🔺)
@sentry/browser - ES5 CDN Bundle (minified) 62.23 KB (+0.03% 🔺)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 18.71 KB (+0.06% 🔺)
@sentry/browser - ES6 CDN Bundle (minified) 55.37 KB (+0.04% 🔺)
@sentry/browser - Webpack (gzipped + minified) 20.44 KB (+0.03% 🔺)
@sentry/browser - Webpack (minified) 66.81 KB (+0.03% 🔺)
@sentry/react - Webpack (gzipped + minified) 20.47 KB (+0.03% 🔺)
@sentry/nextjs Client - Webpack (gzipped + minified) 47.9 KB (+0.02% 🔺)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 27.03 KB (+0.03% 🔺)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 25.29 KB (+0.05% 🔺)
@sentry/replay ES6 CDN Bundle (gzipped + minified) 42.49 KB (0%)
@sentry/replay - Webpack (gzipped + minified) 36.89 KB (0%)
@sentry/browser + @sentry/tracing + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 60.22 KB (+0.02% 🔺)
@sentry/browser + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 53.75 KB (+0.02% 🔺)

@AbhiPrasad
Copy link
Member

As a consequence, this might lower total event volume on the browser SDKs!

@github-actions
Copy link
Contributor

Replay SDK metrics 🚀

    Plain +Sentry +Replay
Revision Value Value Diff Ratio Value Diff Ratio
LCP This PR f993317 77.43 ms 94.70 ms +17.27 ms +22.30 % 136.93 ms +59.50 ms +76.84 %
Previous e9eec27 67.47 ms 102.63 ms +35.17 ms +52.13 % 128.85 ms +61.38 ms +90.98 %
CLS This PR f993317 0.06 ms 0.06 ms -0.00 ms -0.40 % 0.06 ms -0.00 ms -0.49 %
Previous e9eec27 0.06 ms 0.06 ms +0.00 ms +0.07 % 0.06 ms -0.00 ms -0.33 %
CPU This PR f993317 13.02 % 12.92 % -0.10 pp -0.74 % 18.39 % +5.37 pp +41.25 %
Previous e9eec27 19.40 % 19.02 % -0.37 pp -1.92 % 25.44 % +6.04 pp +31.16 %
JS heap avg This PR f993317 1.94 MB 1.99 MB +50.92 kB +2.63 % 2.88 MB +940.45 kB +48.56 %
Previous e9eec27 1.94 MB 1.99 MB +45.82 kB +2.36 % 2.87 MB +927.84 kB +47.75 %
JS heap max This PR f993317 2.3 MB 2.55 MB +250.65 kB +10.89 % 3.36 MB +1.06 MB +46.05 %
Previous e9eec27 2.3 MB 2.55 MB +249.12 kB +10.82 % 3.35 MB +1.05 MB +45.46 %
netTx This PR f993317 0 B 0 B 0 B n/a 2.21 kB +2.21 kB n/a
Previous e9eec27 0 B 0 B 0 B n/a 2.21 kB +2.21 kB n/a
netRx This PR f993317 0 B 0 B 0 B n/a 41 B +41 B n/a
Previous e9eec27 0 B 0 B 0 B n/a 41 B +41 B n/a
netCount This PR f993317 0 0 0 n/a 1 +1 n/a
Previous e9eec27 0 0 0 n/a 1 +1 n/a
netTime This PR f993317 0.00 ms 0.00 ms 0.00 ms n/a 64.52 ms +64.52 ms n/a
Previous e9eec27 0.00 ms 0.00 ms 0.00 ms n/a 88.58 ms +88.58 ms n/a

Previous results on branch: develop

RevisionLCPCLSCPUJS heap avgJS heap maxnetTxnetRxnetCountnetTime
e9eec27+61.38 ms-0.00 ms+6.04 pp+927.84 kB+1.05 MB+2.21 kB+41 B+1+88.58 ms
d604022+58.83 ms-0.00 ms+7.65 pp+930.16 kB+1.05 MB+2.21 kB+41 B+1+109.63 ms
a961e57+54.75 ms-0.00 ms+6.50 pp+929.18 kB+1.07 MB+2.21 kB+41 B+1+92.73 ms
f7c0a2f+46.14 ms+0.00 ms+6.37 pp+921.47 kB+1.06 MB+2.23 kB+41 B+1+207.30 ms
cb19818+57.16 ms+0.00 ms+11.95 pp+1.07 MB+2.21 MB+2.52 kB+41 B+1+111.50 ms
ee301c3+71.07 ms-0.00 ms+12.64 pp+1.07 MB+2.22 MB+2.55 kB+41 B+1+94.67 ms
93c4759+61.10 ms-0.00 ms+12.72 pp+1.08 MB+2.19 MB+2.57 kB+41 B+1+116.75 ms
274f489+63.60 ms-0.00 ms+11.56 pp+1.08 MB+2.2 MB+2.56 kB+41 B+1+116.60 ms
4827b60+58.67 ms+0.00 ms+18.38 pp+1.07 MB+2.22 MB+2.6 kB+41 B+1+91.21 ms
c3806eb+79.85 ms-0.00 ms+12.10 pp+1.05 MB+2.16 MB+2.54 kB+41 B+1+93.58 ms

*) pp - percentage points - an absolute difference between two percentages.
Last updated: Tue, 14 Feb 2023 10:06:42 GMT

@mydea mydea merged commit f8047f6 into develop Feb 14, 2023
@mydea mydea deleted the fn/dedupe-ignore-non-errors branch February 14, 2023 10:19
ramchaik pushed a commit to ramchaik/sentry-javascript that referenced this pull request Feb 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Package: browser Issues related to the Sentry Browser SDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants