[MOD-2255] Android: Upload crash reports to crash server
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-05-19T08:21:36.000+0000 |
Affected Version/s | n/a |
Fix Version/s | ACA 1.0.0 |
Components | ACA |
Labels | n/a |
Reporter | Chee Kiat Ng |
Assignee | Ashraf Abu |
Created | 2016-02-03T05:23:30.000+0000 |
Updated | 2018-08-06T17:49:37.000+0000 |
Description
Using ACRA lib, we should replace our crittercism module and upload crash reports as analytic events to our own PEM crash server.
here's a quick idea of what the JSON should look like:
id - random event id
sid - session of the app (if you can get it, otherwise no worries)
event - "native.crash"
ts - timestamp of the event
data.stack - this seems better than just "value"
mid - the device id, if you can get it
aguid - the app guid
platform - the platform of the app
app_version - the version of the app
and some references:
https://github.com/appcelerator/nodeable/blob/master/common-test/src/main/resources/crash_event.json
https://github.com/appcelerator/crash-analytics-server/blob/master/lib/consumer.js#L39-L55
Attachments
File | Date | Size |
---|---|---|
android_sample1.json | 2016-02-22T03:22:10.000+0000 | 463 |
android_sample2.json | 2016-02-22T03:22:10.000+0000 | 4644 |
sampleNodeServer.js | 2016-05-19T08:29:26.000+0000 | 777 |
[~iwhitfield] Sample from Android: [^android_sample2.json] [^android_sample1.json] It's similar to iOS.
[~msamah] cool thanks! Minor point - dates and stuff will skew unique crash stacks - can they be stripped out? (they start each line)
[~iwhitfield] Which part are you referring to? The dates inside the "data.stack"? The logs? Hmmm... I'll have to check if it's easy to strip them out. It's bad for end point? Will update you.
Events to be named: "crash.native" rather than "native.crash" (From [~iwhitfield]) [~ssombhatla] Fyi.
Just a note:- Crittercism is able to catch NDK crashes. ACRA's NDK crash catching is very limited:- https://github.com/ACRA/acra/issues/129 {quote} Only if that NDK crash bubbles up as a Java RuntimeException/Error. It can catch a segmentation fault. {quote} https://github.com/acra/acra/wiki/AdvancedUsage#catching-native-code-errors {quote} Catching Native Code errors ACRA does not catch errors occurring in native code. We currently don't know any stable solution to catch native errors with ACRA. {quote}
Putting another sample crash here for ref:-
sid
andmid
are not included.Cleaning up older fixed issues. If this issue should not have been closed as fixed, please reopen.