Integrate Instalog into your Expo applications
<application>
tags of your manifest file.
autoCaptureCrashes
is enabled (default).
You can also manually report crashes:
autoCaptureCrashes: true
(default). This captures unhandled JavaScript errors and reports them to Instalog.
You can test this functionality with:
initialize
callisCrashEnabled
is set to trueexpo prebuild --clean
to ensure the plugin is appliedMethod | Description |
---|---|
initialize(key, options) | Initializes the SDK with your API key and optional configuration |
identifyUser(userId) | Identifies the current user |
logEvent(event, params) | Logs an event with optional parameters |
sendCrash(error, stack) | Manually sends a crash report |
showFeedbackModal() | Shows the feedback collection modal |
simulateCrash() | Simulates a crash for testing |
formatErrorReport(error, errorInfo) | Formats an error into a structured report for sending |
Option | Type | Default | Description |
---|---|---|---|
isLogEnabled | boolean | false | Enable event logging |
isLoggerEnabled | boolean | false | Enable debug logging |
isCrashEnabled | boolean | false | Enable crash reporting |
isFeedbackEnabled | boolean | false | Enable feedback collection |
autoCaptureCrashes | boolean | true | Automatically capture unhandled JS errors |
errorGrouping | object | See below | Configure how errors are grouped and reported |
Option | Type | Default | Description |
---|---|---|---|
enabled | boolean | true | Enable error grouping |
flushIntervalMs | number | 30000 | Interval to flush error groups (ms) |
errorThreshold | number | 5 | Number of errors to trigger flush |
timeWindowMs | number | 60000 | Time window for grouping errors (ms) |
flushOnBackground | boolean | true | Flush errors when app goes to background |
requireNetwork | boolean | true | Only flush when network is available |
maxErrorsPerGroup | number | 10 | Max errors to store per group |
dynamicFlushInterval | boolean | true | Adjust flush interval based on error volume |