From fdf31f876f7d7a6b2fec1ddd54e549b72e985f44 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Wed, 17 Sep 2025 15:21:42 +0200 Subject: [PATCH 1/2] RN: Adds instructions for excluding the sentry-android-replay module from android targets --- .../session-replay/performance-overhead.mdx | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/docs/platforms/react-native/session-replay/performance-overhead.mdx b/docs/platforms/react-native/session-replay/performance-overhead.mdx index 477ca0b51dd1a..2044ac1a160bb 100644 --- a/docs/platforms/react-native/session-replay/performance-overhead.mdx +++ b/docs/platforms/react-native/session-replay/performance-overhead.mdx @@ -59,4 +59,17 @@ To minimize the performance impact of the Replay SDK on iOS and Android, conside }); ``` -Note that the default value for `replaysSessionQuality` is `medium` and a `high` quality setting is also available. \ No newline at end of file +Note that the default value for `replaysSessionQuality` is `medium` and a `high` quality setting is also available. + +## Excluding Session Replay from Android + +If you don’t plan to use Session Replay, you can exclude the sentry-android-replay module from your Android targets to reduce the bundle size by about 40KB compressed and 80KB uncompressed.: + +```gradle +// from the android's root build.gradle file +subprojects { + configurations.all { + exclude group: 'io.sentry', module: 'sentry-android-replay' + } +} +``` \ No newline at end of file From 5a82f44d445c8b8c1b17c67e0531d5f8692c59c8 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Wed, 17 Sep 2025 15:40:54 +0200 Subject: [PATCH 2/2] Fix syntax --- .../react-native/session-replay/performance-overhead.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/platforms/react-native/session-replay/performance-overhead.mdx b/docs/platforms/react-native/session-replay/performance-overhead.mdx index 2044ac1a160bb..371ff3f2eff2a 100644 --- a/docs/platforms/react-native/session-replay/performance-overhead.mdx +++ b/docs/platforms/react-native/session-replay/performance-overhead.mdx @@ -63,7 +63,7 @@ Note that the default value for `replaysSessionQuality` is `medium` and a `high` ## Excluding Session Replay from Android -If you don’t plan to use Session Replay, you can exclude the sentry-android-replay module from your Android targets to reduce the bundle size by about 40KB compressed and 80KB uncompressed.: +If you don’t plan to use Session Replay, you can exclude the sentry-android-replay module from your Android targets to reduce the bundle size by about 40KB compressed and 80KB uncompressed. Here's how you can do it: ```gradle // from the android's root build.gradle file