Knowledge Base

cancel
Showing results for 
Search instead for 
Did you mean: 

Custom error events not reported using JavaScript API

While using a Javascript Agent (with adrum.js) to report custom JS error events via the Agent's API, some users find that their error messages are not being reported.

 

This is usually caused by a missing message or line within the beacon.

 

Example:

 

var errorT = new ADRUM.events.Error();

errorT.url('http://localhost:8080/error');          // Optional
errorT.msg('I am a custom error at line 100');  // Mandatory
errorT.line(100);                                             // Mandatory
errorT.stack('some call stack here');                // Optional
ADRUM.report(errorT);

 

Both the message and the line are required. If either is missing, the Collector will reject the beacon.

Version history
Revision #:
3 of 3
Last update:
‎10-12-2018 02:33 PM
Updated by:
 
Labels (1)
Tags (2)


Found this article helpful? Click the Thumbs Up button.
Have an additional comment? Post it below.
Comments

Where would the error end up? In a snapshot for a transaction where the given URL is related to?

@Roel.Beun Custom error events can be viewed in your Browser Snapshots. In your Controller, go to User Experience --> Select the application --> Browser Snapshots. You can also see them in Session Summaries by going to User Experience --> Select the application -> Sessions --> Select a session. Here's a example:

 

 

 

Custom error event.png

I am seeing the same problem.  I want my Javascript errors to participate in a health rule, and throw an alert when the javascript errors.  Has anyone gotten this to work?



Found this article helpful? Click the Thumbs Up button.
Have an additional comment? Post it below.