SDK Debugging
This page explains the different tools to debug your APM React Native integration, bypass the 6-hour batching, and change the SDK log level for your React Native apps.
Debug Mode
In case you would like to view your data on the dashboard without having to wait for the SDK's default 6-hour batching period, you can do so by enabling Debug Mode. Once enabled, data captured by our SDK will be synced upon closing a session and starting a new one. This can be especially helpful if you are debugging an integration issue or simply trying out APM for the first time.
iOS
Debug Mode is enabled by default for iOS if you’re running the app via Xcode (i.e. the debugger is attached).
Android
Enable Debug Mode on Android by running the following command in a terminal:
adb shell setprop debug.luciq.apm.app YOUR_APP_PACKAGE_NAMEDisable Debug Mode on Android with:
adb shell setprop debug.luciq.apm.app nonePlease note that rate limiting will apply if the number of sessions exceeds 50 per hour. Once this limit is reached, you will have to wait until a full hour has elapsed in order to be able to keep using Debug Mode. Data collected during this period will not show up on your Dashboard.
Logging
APM SDK provides useful console logs in Xcode for visibility on significant events. You can control the level of verbosity via the following API.
import Luciq, { LogLevel } from "@luciq/react-native";
Luciq.init({
// ...
debugLogsLevel: LogLevel.debug,
})The available levels are:
none: disables all APM SDK console logs.
error: prints errors only, used to indicate something went wrong.
warning: displays warnings that may not cause errors but should be addressed.
info: default level; logs useful information without being too verbose.
debug: use when debugging an issue. Not recommended for production.
verbose: more detailed than debug; not meant for production environments.
Last updated