Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/StephanPartzsch/as3-airbrake-notifier
Library that sends crash reports from ActionScript 3 to airbrake (http://airbrake.io).
https://github.com/StephanPartzsch/as3-airbrake-notifier
Last synced: 2 months ago
JSON representation
Library that sends crash reports from ActionScript 3 to airbrake (http://airbrake.io).
- Host: GitHub
- URL: https://github.com/StephanPartzsch/as3-airbrake-notifier
- Owner: StephanPartzsch
- License: mit
- Created: 2012-04-27T13:17:49.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2013-06-24T09:10:54.000Z (over 11 years ago)
- Last Synced: 2024-08-04T05:05:34.943Z (6 months ago)
- Language: ActionScript
- Size: 664 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: license.txt
Awesome Lists containing this project
- awesome-actionscript-sorted - as3-airbrake-notifier - Library that sends crash reports from ActionScript 3 to airbrake (http://airbrake.io). (Unsorted / Other API)
README
## as3-airbrake-notifier
The as3-airbrake-notifier sends errors or better said crash reports to [Airbrake](http://airbrake.io). Airbrake receives the error data, collects them and displays them in an nice overview. Simply said it is a crash reporting tool like many others which are used for iOs. But Airbrake has no integration for ActionScript. This gap is filled with the as3-airbrake-notifier and the usage is very simple.
A meaningful use case is the combination with the [global error handling](http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/UncaughtErrorEvent.html), so that every client error can be detected.
* * *
### NoticeThe SWC file of as3-airbrake-notifier requires the as3-yaul SWC to parse the stacktrace. [as3-yaul](https://github.com/StephanPartzsch/as3-yaul) can be found on github too.
* * *
### Example####1) Instantiate the notifier.The first two parameters are the most important.
The first is the application key, which can be found on the left side of the Airbrake project overview (register first).
The second one describes you environment. One of the three presets (testing, production, live) can be chosen from `AirbrakeNotifier`. Custom names are also supported. If it is not set, it will be 'unset'.
The other parameters are optional and provide more detailed information about the application in which the error occurs.airbrakeNotifier = new AirbrakeNotifier( "defbdb1a64105a3c8f64454dbb36b9a3", AirbrakeNotifier.ENVIRONMENT_TESTING, "Application_Version", "Host_Name", "Project_Root" );
####2) Register event listener to check if something went wrong while sending the crash report or if it was finished sucessfully.
airbrakeNotifier.addEventListener( Event.COMPLETE, handleSendAirbrakeNotificationComplete );
airbrakeNotifier.addEventListener( HTTPStatusEvent.HTTP_STATUS, handleAirbrakeNotificationHttpStatus );
airbrakeNotifier.addEventListener( IOErrorEvent.IO_ERROR, handleAirbrakeNotificationIoError );
airbrakeNotifier.addEventListener( SecurityErrorEvent.SECURITY_ERROR, handleAirbrakeSecurityError );
####3) Create a standard crash report. If the errorId is negative, the id will be ignored. The stackTrace of an `Error` object can be parsed with the `StackTraceParser` to an object of type `StackTrace` or the object is filled with custom data.airbrakeNotifier.createCrashReport( error.errorID, error.name, error.message, StackTraceParser.parseStackTrace( error.getStackTrace() ) );
####4) Create an optional request node with information about a (failed) remote request. The most of the parameters are optional.airbrakeNotifier.addRequestInformationsToCrashReport( "URL", "COMPONENT", "ACTION", requestParams, sessionParams, environmentParams );
####5) Finally send the crash report.airbrakeNotifier.sendCrashReport();
* * *
### More informationSee the [notifier API](http://help.airbrake.io/kb/api-2/notifier-api-version-22) for a detailed description of values and how they are used.
### Developer
The 'as3-airbrake-notifier' was developed by [Stephan Partzsch](https://github.com/StephanPartzsch/) and [Peter Höche](https://github.com/PeterHoeche/).