Issue callback listener
Single function with callback to get notified when an issue is detected by the framework.
You can listen for and access every issue in realtime using the Ax.listenForIssue() API.
You need to add the listener in your AppDelegate class. Register only a single global listener to get callbacks for all issues detected by the framework.
AppDelegate
- Objective C
- Swift
[Ax listenForIssues:@selector(issueFound:) atTarget:self];
}
(void) issueFound:(Issue *) issue {
}
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
Ax.initialize(application)
Ax.listenForIssues(forSelector: #selector(issueReported(_:)), atTarget: self)
return true
}
@objc func issueReported(_ issue:Issue){
}
The callback will have an Issue object that contains all the issue properties that are being synced to the server, making the whole process transparent.
The callback will be executed in a background thread, so make sure to use UI thread inside the callback function to implement any UI related actions. This callback is triggered right after an issue occurrence.
Issue fields
type
Mandatory field: Value for this field will be available in all types of issues. Please find the type code on corresponding issue page.
Data type: NSString.
This field gives the type of issue that is raised at the time of the call back.
Complete Issue Type Reference:
| Type | Category | Description | Documentation |
|---|---|---|---|
| 1 | Custom | Report Custom Issues | View Details |
| 2 | Function | Function returns Nil | View Details |
| 3 | Function | Function returns value outside range | View Details |
| 4 | Function | Function returns unexpected boolean value | View Details |
| 5 | Performance | Delayed function execution | View Details |
| 6 | Performance | Screen loading delays | View Details |
| 7 | Feature | Track feature failures | View Details |
| 8 | — | Not Applicable for iOS | — |
| 9 | Memory | Low memory warning | View Details |
| 10 | — | Not Applicable for iOS | — |
| 11 | Crash | Crash Reporting | View Details |
| 12 | Exception | Report Exceptions | View Details |
| 13 | Network | Error in Status Code | View Details |
| 14 | Network | Exception during network call | View Details |
| 15 | Network | Delayed network call | View Details |
| 16 | — | Not Applicable for iOS | — |
| 17 | Memory | Abnormal Memory Usage | View Details |
| 18 | Network | Duplicate network call | View Details |
| 19 | — | Not Applicable for iOS | — |
| 20 | Memory | Spike in Memory Usage | View Details |
| 21 | Memory | Memory leaks | View Details |
| 22 | Error | Track NSError issues | View Details |
| 23 | — | Not Applicable for iOS | — |
| 24 | Performance | Slow frames | View Details |
| 25 | — | Not Applicable for iOS | — |
| 26 | UI | Track App Hangs | View Details |
| 27 | — | Not Applicable for iOS | — |
| 28 | — | Not Applicable for iOS | — |
| 29 | Startup | Cold App Startup delays | View Details |
| 30 | — | Not Applicable for iOS | — |
| 31 | — | Not Applicable for iOS | — |
occurrenceTime
Mandatory field
Data type: int64_t (UNIX Epoch).
Provides the occurrence/ incident time of the issue in milliseconds.
deviceState
Mandatory field
Data type: NSString (JSONObject as NSString).
Provides the multiple data points of device state. Data points like batteryLevel, lastRebootTime, timezoneOffset etc will be available. The data will be passed as a JSON object in NSString format.
severity
Mandatory field
Data type: int64_t.
Provides the severity flag for each type of issue. Incase of custom reported issues, the severity flag can be as set by the developer.
issueShortDescription
Mandatory field
Data type: NSString.
A textual short description of the issue will be passed here. In case of custom reported issues, the second parameter passed will be passed here.
activityTrail
Optional field
Click here to set custom activity trail markers.
Data type: NSArray.
Provides the chronologically ordered list of events collected by the framework along with custom activity markers set by the developer. The data will be passed as a JSON Array in NSArray format.
eventStartTime
Optional field
Data type: int64_t (UNIX Epoch).
Provides the start time of the issue in milliseconds. In case of API call type issues it will provide the start time of API call.
eventEndTime
Optional field
Data type: int64_t (UNIX Epoch).
Provides the end time of the issue in milliseconds. In case of API call type issues it will provide the end time of API call.
url
Optional field
Data type: NSString.
Provides the URL to which an API call was made when an API related issue occurred.
method
Optional field
Data type: NSString.
Provides the Method when an API related issue occurred.
statusCode
Optional field
Data type: int64_t.
Provides the status code when an API related issue occurred.
networkParameters
Optional field
Data type: NSDictionary.
Provides the network parameters like request-response headers, request-response body, status code etc for API related issues, if available.
stacktrace
Optional field
Data type: NSString.
Provides the stack-trace for issues like crashes, AppHangs, framerate etc.
exceptionType
Optional field
Data type: NSString.
In case of crashes or reporting caught exceptions, the type of exception will be made available here.
exceptionLineNumber
Optional field
Data type: int64_t.
In case of crashes or reporting caught exceptions, the line number in the code base that triggered the issue, if available will be passed.
nextFunctionSignature
Optional field
Data type: NSString.
In case of feature tracking the next function signature, if available, that was passed in Observe class will be made available here.
functionParameters
Optional field
Data type: NSArray.
Provides the parameters passed to the function call in case of function tracking and feature tracking issues.
returnValue
Optional field
Data type: NSString.
Provides the return value of a function in case of tracked function and feature tracking issues.
returnValueType
Optional field
Data type: NSString.
Provides the return type of a function in case of tracked function and feature tracking issues.
returnValueSize
Optional field
Data type: int64_t.
Provides the return value size in int64_t of a tracked function in case of function and feature tracking issues.
expectedExecutionTime
Optional field
Data type: int64_t.
In case of feature tracking issues, the time set by the developer in Observe class will be provided here.
customIdentifier
Optional field
Data type: NSString.
Provides the latest custom identifier set by the developer using the setCustomId API for the device.
location
Optional field
Data type: NSString.
Provides the geographic or logical location where the issue occurred, useful for distributed applications or location-based debugging.
functionSignature
Optional field
Data type: NSString.
Provides the signature of the current function being tracked in function and feature tracking.
timerTime
Optional field
Data type: int64_t.
Timer-related timestamp for issues involving time-based operations or delays.
timered
Optional field
Data type: BOOL.
Flag indicating whether the issue is related to timer-based operations or time-sensitive functionality.