Skip to content

Commit a9907a7

Browse files
feat: Disable CrashReporting for RN iOS and Android (#504)
## Summary RN need specific RN crash reporting and it should be parametrized as well (in future) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Moderate risk due to upgrading the iOS `LaunchDarklySessionReplay` pod and changing observability instrumentation defaults on both iOS and Android, which could affect telemetry/crash capture behavior. > > **Overview** > Disables native crash-reporting instrumentation in the React Native Session Replay adapters by turning off OpenTelemetry crash reporting on Android (`ObservabilityOptions.Instrumentations(crashReporting = false)`) and disabling the KSCrash-based reporter on iOS (`crashReporting: .init(source: .none)`). > > Also bumps the iOS `LaunchDarklySessionReplay` CocoaPods dependency from `~> 0.26.2` to `~> 0.33.1`. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit cdd3a29. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent 2b0ea17 commit a9907a7

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

sdk/@launchdarkly/react-native-ld-session-replay/SessionReplayReactNative.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Pod::Spec.new do |s|
1616
s.source_files = "ios/**/*.{h,m,mm,swift,cpp}"
1717
s.private_header_files = "ios/**/*.h"
1818

19-
s.dependency 'LaunchDarklySessionReplay', '~> 0.26.2'
19+
s.dependency 'LaunchDarklySessionReplay', '~> 0.33.1'
2020

2121
install_modules_dependencies(s)
2222
end

sdk/@launchdarkly/react-native-ld-session-replay/android/src/main/java/com/sessionreplayreactnative/SessionReplayClientAdapter.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,10 @@ internal class SessionReplayClientAdapter private constructor() {
141141
options = ObservabilityOptions(
142142
serviceName = serviceName,
143143
logAdapter = LDAndroidLogging.adapter(),
144+
// Disable the OpenTelemetry Android CrashReporterInstrumentation
145+
instrumentations = ObservabilityOptions.Instrumentations(
146+
crashReporting = false,
147+
),
144148
)
145149
),
146150
SessionReplay(options = replayOptions),

sdk/@launchdarkly/react-native-ld-session-replay/ios/SessionReplayClientAdapter.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ public class SessionReplayClientAdapter: NSObject {
4343
Observability(
4444
options: .init(
4545
serviceName: options.serviceName,
46-
sessionBackgroundTimeout: 10
46+
sessionBackgroundTimeout: 10,
47+
/// Disable the underlying KSCrash-based crash reporter that
48+
crashReporting: .init(source: .none)
4749
)
4850
),
4951
SessionReplay(options: options)

0 commit comments

Comments
 (0)