-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
recording: OnTouchEventListener try catch guard to swallow unexpected errors take 2 #196
Conversation
} | ||
} catch (e: Throwable) { | ||
config.logger.log("Executor#OnTouchEventListener $motionEvent failed: $e.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if this happens, its our fault
config.logger.log("TouchEventInterceptor $motionEvent failed: $e.") | ||
throw e |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if this happens, its not our fault
@@ -216,27 +216,34 @@ public class PostHogReplayIntegration( | |||
} | |||
|
|||
private val onTouchEventListener = | |||
OnTouchEventListener { motionEvent -> | |||
TouchEventInterceptor { motionEvent, dispatch -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed to a lower level interceptor, so we call the dispatch and log out
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only comment is that we may want to move the isSessionReplayEnabled
check to when generateMouseInteractios
is called so we get some error logs even when session replay is not enabled. If that makes sense to you. Otherwise LGMT
this code is not even executed if session replay is disabled, so moving the check would not have any effect |
💡 Motivation and Context
Tries to fix https://github.com/PostHog/posthog-react-native-session-replay/issues/4
It's unclear if PostHog SDK is responsible for that, since the SDK intercepts the touch, the SDK will be always part of the stack trace, it does not mean its the SDK causing it.
💚 How did you test it?
📝 Checklist