Automatic Instrumentation¶
Log Events¶
Upon start, the SDK automatically tracks a set of logs by observing certain app and device states.
| Event | Notes |
|---|---|
| App Close | Triggered by ProcessLifecycleOwner Lifecycle.Event.ON_STOP |
| App Exit | Emitted each time the SDK is started and Android returns a result from the getHistoricalProcessExitReasons method containing details about the ApplicationExitInfo. |
| App Launch | Triggered by ProcessLifecycleOwner Lifecycle.Event.ON_CREATE |
| App Launch TTI | Manually emitted by the SDK customer when the app becomes interactive or when a user interacts with the app, depending on the desired behavior. |
| App Moved To Background | Triggered by ProcessLifecycleOwner Lifecycle.Event.ON_PAUSE |
| App Moved To Foreground | Triggered by ProcessLifecycleOwner Lifecycle.Event.ON_RESUME |
| App Open | Triggered by ProcessLifecycleOwner Lifecycle.Event.ON_START |
| App Update | Emitted each time the SDK detects an versionName or longVersionCode change. The emitted log event contains information about the app installation size. |
| Fatal Issue - JVM | Triggered by intercepting uncaught exceptions |
| Low Power Mode | Triggered by isPowerSaveMode |
| Memory Pressure | Emitted when app memory usage exceeds ActivityManager.MemoryInfo.threshold. Replaces noisy onTrimMemory-based logging. |
| Orientation Change | Emmitted each time the SDK detects a device orientation change. |
| Resource Utilization | Periodically reported event with a snapshot of application's resource consumption. The information captured, among others, includes memory usage and battery level. |
| SDK Started | Emitted each time the SDK is started. It contains information about the SDK version and the duration of time the start took. |
| Screen View | Manually emitted by the SDK customer when a user navigates to a different screen view representation. |
| Slow Rendering | Emitted whenever an application frame takes too long to render, as detected by the JankStats library. Android defines default latency thresholds: frames taking longer than 16 ms are classified as Slow Frames, longer than 700 ms as Frozen Frames, and frames that exceed 5 seconds are labeled as ANR (Application Not Responding) Frames. These thresholds can be customized via runtime flags. |
| Thermal State Changed | Emitted each time the callbacks of OnThermalStatusChangedListener are called. |
| Timezone Change | Triggered by Intent.ACTION_TIMEZONE_CHANGED |
| Event | Notes |
|---|---|
| App Close | Triggered by UIApplicationDidEnterBackgroundNotification |
| App Did Finish Launching | Triggered by didFinishLaunchingNotification |
| App Launch TTI | Manually emitted by the SDK customer when the app becomes interactive or when a user interacts with the app, depending on the desired behavior. |
| App Not Responding (ANR) | Emitted each time the main run loop becomes unresponsive for a specified amount of time. Default is 2 seconds but can be configured by runtime flag. |
| App Open | Triggered by UIApplicationWillEnterForegroundNotification or didFinishLaunchingNotification |
| App Update | Emitted each time the SDK detects a version or build number change. The emitted log event contains information about the app installation size. |
| App Will Terminate | Triggered by UIApplicationWillTerminateNotification |
| Low Power Mode | Triggered by isLowPowerModeEnabled |
| Memory Pressure | Triggered by applicationDidReceiveMemoryWarning |
| Orientation Change | Emmitted each time the SDK detects a device orientation change. |
| Resource Utilization | Periodically reported event with a snapshot of application's resource consumption. The information captured, among others, includes memory usage and battery level. |
| Scene Did Enter Background | Triggered by UIApplicationDidEnterBackgroundNotification |
| Scene Will Enter Foreground | Triggered by UIApplicationWillEnterForegroundNotification |
| Screen View | Manually emitted by the SDK customer when a user navigates to a different screen view representation. |
| SDK Started | Emitted each time the SDK is started. It contains information about the duration of time the start took. |
| Session Replay | Emitted each time the SDK captures session replay frame. |
| Thermal State Changed | Emitted each time ProcessInfo.thermalStateDidChangeNotification notification is posted. |
| Timezone Change | Triggered by NSSystemTimeZoneDidChange |
React Native supports all the out of the box events provided by the platform the app is running on, see the iOS and Android sections for more details.
| Event | Notes |
|---|---|
| SDK Started | Emitted each time the SDK is started. It contains information about the duration of time the start took. |
Resource Reporting¶
The Capture SDK can take periodic snapshots of the resource consumption of the app on the device. The information captured, among others, includes memory usage and battery level.
Session Replay¶
The Capture SDK makes it possible to periodically capture optimized representations of the user screen that do not include Personal Identifiable Information (PII) like text or images.
The feature captures the application screen on a periodic basis, is enabled by default, and can be disabled at any time through a remote configuration update.
The feature allows you to specify additional categorizers, which can be used to provide custom rendering for your app-specific views. For example, categorizers can inform the SDK that your custom implementation of a switch-like UI should be rendered as a switch.
Logger.start(
// ...
configuration = Configuration(
sessionReplayConfiguration = SessionReplayConfiguration(
categorizers = mapOf(
ReplayType.View to listOf("CoreUiPanel")
)
)
)
)
Info
Session Replay supports both standard Android views as well as Compose views.
HashMap categorizers = new HashMap();
List<String> names = new LinkedList<String>();
names.add("CoreUiPanel")
categorizers.put(ReplayType.View, names);
Logger.start(
// ...
new Configuration(
new SessionReplayConfiguration(
categorizers // categorizers
)
)
);
Info
Session Replay supports both standard Android views as well as Compose views.
Logger.start(
// ...
configuration: .init(
sessionReplayConfiguration: .init(
categorizers: [
"CoreUiPanel": AnnotatedView(.view, recurse: false),
]
)
)
)
Info
Session Replay supports both UIKit views as well as SwiftUI views.
TTI¶
Currently the SDK requires the customer to supply Time To Interactive (TTI) information via an explicit API. This data will be used to populate the App Launch TTI log event as well as data in the TTI instant insights dashboard.
Logger.logAppLaunchTTI(...)
Logger.logAppLaunchTTI(...);
Logger.logAppLaunchTTI(...)
import { logAppLaunchTTI } from '@bitdrift/react-native';
logAppLaunchTTI(ttiMs)
Screen Views¶
Currently the SDK requires the customer to supply which screens the users has visited via an explicit API. This data will be used to populate the User Journeys instant insights dashboard.
Logger.logScreenView("my_screen_name")
Logger.logScreenView("my_screen_name");
Logger.logScreenView("my_screen_name")
import { logScreenView } from '@bitdrift/react-native';
logScreenView('my_screen_name')
Fatal Issues and Crash Reporting¶
Refer to Fatal Issues & Crashes section for more details about how to enable automatic detection and upload of issues.
Integrations¶
Refer to Integrations section for more details about various integrations including, but not limited to, capturing of network traffic information.