Raygun for Angular 2
A pre-packaged Angular 2 addon that attempts to take the hard work out of logging errors with Raygun. Still very much in beta but logs plenty of information already.
Installation
From within an Angular2 project
npm install raygun-angular2 --save
typings install npm:raygun-angular2 --save
If you are using a similar setup to the Angular2 Quickstart (i.e., using SystemJS)
add the following to your System.config
:
System;
Usage
raygun-angular2 has a dependency on @angular/http
so ensure that
the bundle is loaded and the provider is bootstrapped in to your
application
;;;;;; RaygunExceptionHandlerapiKey = 'Enter API Key here'; ;
Development Environments
To prevent errors being reported to Raygun during development
use setDevelopmentHostnames
to blacklist your local hostnames.
RaygunExceptionHandler;
Still To Do
- Provide public method to set user
- Fill in gaps in collected information
- Use
X-ApiKey
headers rather than a query string, however Raygun currently does not correctly respond to the pre-flight request generated by Angular2.
Contributors
Pull requests are always welcome. Please make sure that your work is tested, follows the established code convention and passes the AppVeyor build.