Quick Trial for Bugsnag

I heard about the company named Bugsnag in the last week's ForwardJS 5 conference. They provide a full stack error tracking solution.

A demo can be scheduled as needed. The pricing plan suitable for us is $29/mo. for 5 team members.

Step-by-step guide

Client-side: Angular JS tracking

  1. Create an Angular project in Bugsnap, and get a Bugsnap API key for this project
  2. Add the following code into <header> in .html/.cfm

      <script
    	  src="//d2wy8f7a9ursnm.cloudfront.net/bugsnag-2.min.js"
    	  data-apikey="xxxxxxxxxxxxxxxx" /// Your API key here
    	</script>
  3. Add the following code into <body>

    <script>
    	angular.module('exceptionOverride', []).factory('$exceptionHandler', function () {
    	  return function (exception, cause) {
    	    Bugsnag.notifyException(exception, {diagnostics:{cause: cause}});
    	  };
    	});
    </script>
  4. Then test if the error tracking works

Server-side: ColdFusion tracking

  1. Create an other project in Bugsnap, and get a Bugsnap API key for this project
  2. Download a Bugsnag Coldfusion component: https://github.com/RickGroenewegen/bugsnag-coldfusion
  3. Place BugSnag.cfc somehwere into your project, usually under the root
  4. Configure the 'onError' method in your Application.cfc so that it passes the exception to BugSnag.cfc:

    <cffunction name="onError" returntype="void" output="false">
    
        <cfargument name="exception" type="any" required="true"/>
    
        <cfset local.bugSnag = createObject("component","BugSnag").init(
            APIKey = "xxxxxxxxxxxxxxxx"
        )/>
    
        <!--- Notify BugSnag --->
        <cfset local.bugSnag.notifyError(exception = arguments.exception)/>
    
    </cffunction>
  5. You can modify BugSnag.cfc to enable the session scope
  6. Then test