Skip to content

fix(integration): Ensure dedupe integration ignores non-errors - #7172

Merged
mydea merged 1 commit into
developfrom
fn/dedupe-ignore-non-errors
Feb 14, 2023
Merged

fix(integration): Ensure dedupe integration ignores non-errors#7172
mydea merged 1 commit into
developfrom
fn/dedupe-ignore-non-errors

Conversation

@mydea

Copy link
Copy Markdown
Member

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... 🤔

@mydeamydea self-assigned this Feb 14, 2023
@mydeamydea mentioned this pull request Feb 14, 2023
3 tasks
@mydeamydea changed the title fix(browser): Ensure dedupe integration ignores non-errorsfix(integration): Ensure dedupe integration ignores non-errorsFeb 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
Copy Markdown
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
Copy Markdown
MemberAuthor

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
Copy Markdown
Contributor

size-limit report 📦

PathSize
@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
Copy Markdown
Contributor

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

@github-actions

Copy link
Copy Markdown
Contributor

Replay SDK metrics 🚀

Plain+Sentry+Replay
RevisionValueValueDiffRatioValueDiffRatio
LCPThis PR f99331777.43 ms94.70 ms+17.27 ms+22.30 %136.93 ms+59.50 ms+76.84 %
Previous e9eec2767.47 ms102.63 ms+35.17 ms+52.13 %128.85 ms+61.38 ms+90.98 %
CLSThis PR f9933170.06 ms0.06 ms-0.00 ms-0.40 %0.06 ms-0.00 ms-0.49 %
Previous e9eec270.06 ms0.06 ms+0.00 ms+0.07 %0.06 ms-0.00 ms-0.33 %
CPUThis PR f99331713.02 %12.92 %-0.10 pp-0.74 %18.39 %+5.37 pp+41.25 %
Previous e9eec2719.40 %19.02 %-0.37 pp-1.92 %25.44 %+6.04 pp+31.16 %
JS heap avgThis PR f9933171.94 MB1.99 MB+50.92 kB+2.63 %2.88 MB+940.45 kB+48.56 %
Previous e9eec271.94 MB1.99 MB+45.82 kB+2.36 %2.87 MB+927.84 kB+47.75 %
JS heap maxThis PR f9933172.3 MB2.55 MB+250.65 kB+10.89 %3.36 MB+1.06 MB+46.05 %
Previous e9eec272.3 MB2.55 MB+249.12 kB+10.82 %3.35 MB+1.05 MB+45.46 %
netTxThis PR f9933170 B0 B0 Bn/a2.21 kB+2.21 kBn/a
Previous e9eec270 B0 B0 Bn/a2.21 kB+2.21 kBn/a
netRxThis PR f9933170 B0 B0 Bn/a41 B+41 Bn/a
Previous e9eec270 B0 B0 Bn/a41 B+41 Bn/a
netCountThis PR f993317000n/a1+1n/a
Previous e9eec27000n/a1+1n/a
netTimeThis PR f9933170.00 ms0.00 ms0.00 msn/a64.52 ms+64.52 msn/a
Previous e9eec270.00 ms0.00 ms0.00 msn/a88.58 ms+88.58 msn/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 developFeb 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 freeto 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.

3 participants

@mydea@AbhiPrasad@lforst