sentry-java icon indicating copy to clipboard operation
sentry-java copied to clipboard

Session Replay for native Android applications

Open bruno-garcia opened this issue 2 years ago • 9 comments

Problem Statement

Support for Session Replay for Native Android apps

We're working on it! Wanna join the early adopter release? Join the waitlist and discussion about the feature:

  • https://github.com/getsentry/sentry/discussions/63138

Solution Brainstorm

  • [ ] Activity/fragments
  • [ ] Jetpack Compose

┆Issue is synchronized with this Jira Improvement by Unito

bruno-garcia avatar Jan 16 '23 21:01 bruno-garcia

It might be easier to implement for Jetpack Compose as the runtime is packaged as part of the app, allowing us to instrument the drawing code at build-time (as opposed to the Android View System where the drawing commands are provided by the system). See

  • https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/ui/ui-graphics/src/androidMain/kotlin/androidx/compose/ui/graphics/AndroidCanvas.android.kt
  • https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:text/text/src/main/java/androidx/compose/ui/text/android/TextAndroidCanvas.kt

markushi avatar Feb 17 '23 10:02 markushi

It might be easier to implement for Jetpack Compose as the runtime is packaged as part of the app, allowing us to instrument the drawing code at build-time (as opposed to the Android View System where the drawing commands are provided by the system). See

  • https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/ui/ui-graphics/src/androidMain/kotlin/androidx/compose/ui/graphics/AndroidCanvas.android.kt
  • https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:text/text/src/main/java/androidx/compose/ui/text/android/TextAndroidCanvas.kt

Does this mean you wouldn't implement "classic" way for apps (I mean java activities)?

GeekCornerGH avatar May 19 '23 09:05 GeekCornerGH

@GeekCornerGH we definitely would, at the very least to support React Native which has a way bigger demand and still uses traditional android Views as of now.

romtsn avatar May 19 '23 10:05 romtsn

Interesting. For my usecase, I can't use React Native, what would be the top priority between Compose and Views?

GeekCornerGH avatar May 20 '23 18:05 GeekCornerGH

Interesting. For my usecase, I can't use React Native, what would be the top priority between Compose and Views?

Not saying you should use RN, but just meant if we were to implement Session Replay on Android, we would definitely start with something that supports React Native (=Views), so you're covered :)

romtsn avatar May 23 '23 14:05 romtsn

Interesting. For my usecase, I can't use React Native, what would be the top priority between Compose and Views?

Not saying you should use RN, but just meant if we were to implement Session Replay on Android, we would definitely start with something that supports React Native (=Views), so you're covered :)

Alright, apologies for my misunderstanding, and thanks for providing such tools for free!

GeekCornerGH avatar May 23 '23 17:05 GeekCornerGH

We're doing a PoC of this as we speak. We should have some updates after the holidays

bruno-garcia avatar Dec 06 '23 22:12 bruno-garcia

We're working on it! Wanna join the early adopter release? Join the waitlist and discussion about the feature:

  • https://github.com/getsentry/sentry/discussions/63138

bruno-garcia avatar Jan 12 '24 21:01 bruno-garcia

We released our first Alpha version of the SDK with support: https://github.com/getsentry/sentry-java/releases/tag/7.8.0-alpha.0

To get access, it requires adding your Sentry org to our feature flag. This way data can be ingested and displayed in Sentry. Please let us know on the waitlist if you're interested

bruno-garcia avatar Apr 09 '24 21:04 bruno-garcia