Skip to content

Keep session state correct when a JS error is dropped by sampling (updateSessionForDroppedEventNonTerminating) #6660

Description

@antonis

Background

sentry-java 8.55.0 (#5990) added InternalSentrySdk.updateSessionForDroppedEventNonTerminating so hybrid SDKs can still update the session (error count) when an error is dropped by sampling, without terminating it.

Current RN behavior

When an error is dropped on the JS side (e.g. sampleRate, beforeSend returning null), the envelope is never forwarded to native, so the native session is never updated to reflect that an error occurred. The only native session signal is via captureEnvelope (wrapper.ts:196-235RNSentryModuleImpl.java:500-511).

Question / scope

Evaluate whether RN's errored/session error counts drift when JS-side sampling drops error events, and whether to call updateSessionForDroppedEventNonTerminating in that path. Pairs with #6659.

Follow-up from the 8.55.0 bump (#6658).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions