Skip to content

Conversation

@mydea
Copy link
Member

@mydea mydea commented 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.

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;
    let errored = false;
    const exceptions = event.exception && event.exception.values;

    if (exceptions) {
      errored = true;

      for (const ex of exceptions) {
        const mechanism = ex.mechanism;
        if (mechanism && mechanism.handled === false) {
          crashed = true;
          break;
        }
      }
    }

So we can get rid of this private method call.

@mydea mydea added the Package: replay Issues related to the Sentry Replay SDK label Dec 13, 2022
@mydea mydea requested review from Lms24 and billyvg December 13, 2022 10:33
@mydea mydea 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 mydea force-pushed the fn/replay-stop-updateSession branch from 91464b5 to 0512761 Compare December 13, 2022 10:36
@github-actions
Copy link
Contributor

size-limit report 📦

Path Size
@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% 🔽)

Copy link
Member

@Lms24 Lms24 left a comment

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 master Dec 13, 2022
@mydea mydea deleted the fn/replay-stop-updateSession branch December 13, 2022 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Package: replay Issues related to the Sentry Replay SDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants