Error Tracking
Generates: Events (Log Records)
Manually report non-fatal errors — caught exceptions and handled error conditions that don't crash the app.
For automatic crash detection, see Crash Instrumentation.
Usage
// Report by message
PulseSDK.INSTANCE.trackNonFatal(
name = "API request failed",
observedTimeStampInMs = System.currentTimeMillis(),
params = mapOf("endpoint" to "/api/users", "status_code" to 500),
)
// Report a caught exception
try {
riskyOperation()
} catch (e: Exception) {
PulseSDK.INSTANCE.trackNonFatal(
throwable = e,
observedTimeStampInMs = System.currentTimeMillis(),
params = mapOf("context" to "payment_flow"),
)
}
When passing a Throwable, exception.type, exception.message, and exception.stacktrace are captured automatically.
Attributes
| Attribute | Description | Always Present |
|---|---|---|
pulse.type | "non_fatal" | ✅ |
exception.type | Exception class name | ⚠️ Throwable only |
exception.message | Exception message | ⚠️ Throwable only |
exception.stacktrace | Full stack trace | ⚠️ Throwable only |
screen.name | Current screen | ⚠️ If available |
| Custom attributes | Any params you pass | ⚠️ If provided |
Related
- Crashes — Automatic crash detection
- Custom Spans — Record exceptions on spans