Crash Instrumentation
Generates: Events (Log Records)
Automatically captures Java/Kotlin crashes and uncaught exceptions.
How It Works
Pulse Android SDK automatically captures uncaught Java/Kotlin exceptions by installing a default uncaught exception handler. This ensures all crashes are reported with full stack trace, thread information, and system state.
Configuration
Crash detection is enabled by default when using the Android agent. You can configure it during SDK initialization:
PulseSDK.INSTANCE.initialize(
application = this,
endpointBaseUrl = "https://your-backend.com",
) {
crash {
enabled(true) // Enabled by default
}
}
What Gets Tracked
- Java/Kotlin crashes (uncaught exceptions)
- JavaScript exceptions from React Native
- Full stack traces
- Thread information (ID and name)
- System state (battery, memory, storage)
- Exception type and message
Generated Telemetry
Type: Log Record (Event)
Body: Exception message (may be empty)
pulse.type: device.crash
Scope Name: io.opentelemetry.crash
Attributes
Crash-Specific Attributes
| Attribute | Description | Example | Always Present |
|---|---|---|---|
pulse.type | Instrumentation type | "device.crash" | ✅ Yes |
exception.type | Exception class name | "com.facebook.react.common.JavascriptException", "java.lang.NullPointerException" | ✅ Yes |
exception.message | Exception message | "Error: Unhandled error (demo)" | ✅ Yes |
exception.stacktrace | Full stack trace | Complete stack trace string | ✅ Yes |
thread.id | Thread ID where crash occurred | 81, 2 | ✅ Yes |
thread.name | Thread name | "mqt_v_native", "main" | ✅ Yes |
screen.name | Current screen/activity name | "MainActivity" | ⚠️ If available |
session.id | Session identifier | "f40364c92b85ec0c19c35a65be42b97f" | ✅ Yes |
network.connection.type | Connection type | "wifi", "cell" | ✅ Yes |
battery.percent | Battery percentage | 100, 85 | ✅ Yes |
heap.free | Free heap memory (bytes) | 2243022 | ✅ Yes |
storage.free | Free storage space (bytes) | 1239150592 | ✅ Yes |
Note: All crash events include global attributes (service, device, OS, session, network carrier, etc.) in the
resourcesobject. See Global Attributes for complete list.
Sample Payload: Native Crash
{
"body": "",
"date": "2025-11-27T08:38:56.472019Z",
"id": "0iiPdg5oW57kWey8dHienFjlP9S",
"timestamp": "2025-11-27T08:38:56.472019Z",
"attributes": {
"pulse.type": "device.crash",
"exception.type": "com.facebook.react.common.JavascriptException",
"exception.message": "Error: Unhandled error (demo), stack:\nanonymous@1:963154\n",
"exception.stacktrace": "com.facebook.react.common.JavascriptException: Error: Unhandled error (demo), stack:\nanonymous@1:963154\n\n\tat com.facebook.react.modules.core.ExceptionsManagerModule.reportException(ExceptionsManagerModule.kt:52)\n\tat com.facebook.jni.NativeRunnable.run(Native Method)\n\tat android.os.Handler.handleCallback(Handler.java:995)\n\t...",
"thread.id": 81,
"thread.name": "mqt_v_native",
"battery.percent": 100,
"heap.free": 2243022,
"storage.free": 1239150592,
"network.connection.type": "wifi",
"screen.name": "MainActivity",
"session.id": "f40364c92b85ec0c19c35a65be42b97f"
},
"resources": {
"android.os.api_level": "36",
"app.build_id": "1",
"app.build_name": "1.0_1",
"device.manufacturer": "Google",
"device.model.identifier": "sdk_gphone64_arm64",
"device.model.name": "sdk_gphone64_arm64",
"os.description": "BE2A.250530.026.D1",
"os.name": "Android",
"os.type": "linux",
"os.version": "16",
"rum.sdk.version": "0.16.0-alpha-SNAPSHOT",
"service.name": "PulseReactNativeOtelExample",
"service.version": "1.0_1",
"telemetry.sdk.language": "java",
"telemetry.sdk.name": "opentelemetry",
"telemetry.sdk.version": "1.54.1"
},
"scope_name": "io.opentelemetry.crash",
"span_id": "",
"trace_flags": 0,
"trace_id": ""
}
Note: You can still manually report non-fatal errors using Error Tracking.