Skip to content

ref(replay): Stop calling _updateSessionFromEvent - #6510

Merged
mydea merged 1 commit into
masterfrom
fn/replay-stop-updateSession
Dec 13, 2022
Merged

ref(replay): Stop calling _updateSessionFromEvent#6510
mydea merged 1 commit into
masterfrom
fn/replay-stop-updateSession

Conversation

@mydea

Copy link
Copy Markdown
Member

This can't really have an impact, as that only does stuff when the event has exception, which a replay does not.

See: https://github.com/getsentry/sentry-javascript/blob/master/packages/core/src/baseclient.ts#L338:

protected_updateSessionFromEvent(session: Session,event: Event): void{let crashed =false;leterrored=false;constexceptions=event.exception&&event.exception.values;if(exceptions){errored=true;for(constexofexceptions){constmechanism=ex.mechanism;if(mechanism&&mechanism.handled===false){crashed=true;break;}}}

So we can get rid of this private method call.

@mydea
mydea requested review from Lms24 and billyvgDecember 13, 2022 10:33
@mydeamydea self-assigned this Dec 13, 2022
This can't really have an impact, as that only does stuff when the event has `exception`, which a replay does not.
@mydea
mydeaforce-pushed the fn/replay-stop-updateSession branch from 91464b5 to 0512761CompareDecember 13, 2022 10:36
@github-actions

Copy link
Copy Markdown
Contributor

size-limit report 📦

PathSize
@sentry/browser - ES5 CDN Bundle (gzipped + minified)19.71 KB (-0.04% 🔽)
@sentry/browser - ES5 CDN Bundle (minified)61.07 KB (-0.07% 🔽)
@sentry/browser - ES6 CDN Bundle (gzipped + minified)18.5 KB (-0.05% 🔽)
@sentry/browser - ES6 CDN Bundle (minified)54.6 KB (-0.08% 🔽)
@sentry/browser - Webpack (gzipped + minified)20.28 KB (0%)
@sentry/browser - Webpack (minified)66.33 KB (0%)
@sentry/react - Webpack (gzipped + minified)20.3 KB (0%)
@sentry/nextjs Client - Webpack (gzipped + minified)47.5 KB (+0.42% 🔺)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified)26.69 KB (-0.04% 🔽)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified)25.14 KB (-0.04% 🔽)
@sentry/replay ES6 CDN Bundle (gzipped + minified)41.71 KB (-0.06% 🔽)
@sentry/replay - Webpack (gzipped + minified)37.98 KB (-0.07% 🔽)

@Lms24Lms24 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Good catch!

@mydea
mydea merged commit c2eb012 into masterDec 13, 2022
@mydea
mydea deleted the fn/replay-stop-updateSession branch December 13, 2022 14:33
@mydeamydea mentioned this pull request Dec 13, 2022
5 tasks
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@billyvg@Lms24