09 Jan 2018
Raygun is an intelligent bug tracking service which gives you deep insight into the errors happening on your website and who it is happening to. You can find out so much information to help you reproduce the errors.
It even has real-time monitoring where you can see who is on your site now and what the experience is like for them. You can see the pages they visited on your site and the order they visited them in. You can see if any errors occurred during their session and how long different pages take to load.
You can also record bugs with the logged in user id, so you know exactly who has been affected by the error and you can get in touch with them before they even realise there was an error.
Install-Package Mindscape.Raygun4Net
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="RaygunSettings" type="Mindscape.Raygun4Net.RaygunSettings, Mindscape.Raygun4Net" />
</configSections>
<RaygunSettings apikey="xxxxxxxxxxxxxxxxxxxxxxxx" />
<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
<add name="RaygunErrorModule" type="Mindscape.Raygun4Net.RaygunHttpModule" />
</modules>
</system.webServer>
</configuration>
If you want to see realtime error from people using your site, then you can set up the Real User Monitoring.
<script type="text/javascript"> !function(a,b,c,d,e,f,g,h){a.RaygunObject=e,a[e]=a[e]||function(){ (a[e].o=a[e].o||[]).push(arguments)},f=b.createElement(c),g=b.getElementsByTagName(c)[0], f.async=1,f.src=d,g.parentNode.insertBefore(f,g),h=a.onerror,a.onerror=function(b,c,d,f,g){ h&&h(b,c,d,f,g),g||(g=new Error(b)),a[e].q=a[e].q||[],a[e].q.push({ e:g})}}(window,document,"script","//cdn.raygun.io/raygun4js/raygun.min.js","rg4js"); </script>
<script type="text/javascript"> rg4js('apiKey', 'xxxxxxxxxxxxxxxxxxxxxxxx'); rg4js('enableCrashReporting', true); rg4js('enablePulse', true); </script>
That's it, you're all set to start tracking errors in your application, and even in realtime.
If you want to you can track individual users by passing through their user details.
<script type="text/javascript">
rg4js('setUser', {
identifier: 'users_email_address_or_unique_id',
isAnonymous: false,
email: '[email protected]',
firstName: 'Firstname',
fullName: 'Firstname Lastname'
});
</script>