|
22 | 22 | import io.sentry.android.core.internal.util.SentryFrameMetricsCollector; |
23 | 23 | import io.sentry.android.core.performance.AppStartMetrics; |
24 | 24 | import io.sentry.android.fragment.FragmentLifecycleIntegration; |
| 25 | +import io.sentry.android.replay.DefaultReplayBreadcrumbConverter; |
| 26 | +import io.sentry.android.replay.ReplayIntegration; |
25 | 27 | import io.sentry.android.timber.SentryTimberIntegration; |
26 | 28 | import io.sentry.cache.PersistingOptionsObserver; |
27 | 29 | import io.sentry.cache.PersistingScopeObserver; |
28 | 30 | import io.sentry.compose.gestures.ComposeGestureTargetLocator; |
29 | 31 | import io.sentry.compose.viewhierarchy.ComposeViewHierarchyExporter; |
30 | 32 | import io.sentry.internal.gestures.GestureTargetLocator; |
31 | 33 | import io.sentry.internal.viewhierarchy.ViewHierarchyExporter; |
| 34 | +import io.sentry.transport.CurrentDateProvider; |
32 | 35 | import io.sentry.transport.NoOpEnvelopeCache; |
33 | 36 | import io.sentry.util.LazyEvaluator; |
34 | 37 | import io.sentry.util.Objects; |
@@ -237,7 +240,8 @@ static void installDefaultIntegrations( |
237 | 240 | final @NotNull LoadClass loadClass, |
238 | 241 | final @NotNull ActivityFramesTracker activityFramesTracker, |
239 | 242 | final boolean isFragmentAvailable, |
240 | | - final boolean isTimberAvailable) { |
| 243 | + final boolean isTimberAvailable, |
| 244 | + final boolean isReplayAvailable) { |
241 | 245 |
|
242 | 246 | // Integration MUST NOT cache option values in ctor, as they will be configured later by the |
243 | 247 | // user |
@@ -302,6 +306,13 @@ static void installDefaultIntegrations( |
302 | 306 | new NetworkBreadcrumbsIntegration(context, buildInfoProvider, options.getLogger())); |
303 | 307 | options.addIntegration(new TempSensorBreadcrumbsIntegration(context)); |
304 | 308 | options.addIntegration(new PhoneStateBreadcrumbsIntegration(context)); |
| 309 | + if (isReplayAvailable) { |
| 310 | + final ReplayIntegration replay = |
| 311 | + new ReplayIntegration(context, CurrentDateProvider.getInstance()); |
| 312 | + replay.setBreadcrumbConverter(new DefaultReplayBreadcrumbConverter()); |
| 313 | + options.addIntegration(replay); |
| 314 | + options.setReplayController(replay); |
| 315 | + } |
305 | 316 | } |
306 | 317 |
|
307 | 318 | /** |
|
0 commit comments