This is usually caused by a missing message or line within the beacon.
var errorT = new ADRUM.events.Error();errorT.url('http://localhost:8080/error'); // OptionalerrorT.msg('I am a custom error at line 100'); // MandatoryerrorT.line(100); // MandatoryerrorT.stack('some call stack here'); // OptionalADRUM.report(errorT);
Both the message and the line are required. If either is missing, the Collector will reject the beacon.
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:
Using the Sessions view is painful and doesn't give you a high level view of all your custom errors. You will need to click on each URL and it may or may not be your error.
A better approach I have come across with some help from AppD support team is to use the analytics view and I think that will give you what you want here.
Hope this helps someone as it took a while to get this answer!
Where can I see the stack trace added in the script. I don't see it in browser snapshot or ADQL query.
errorT.stack('some call stack here');
In 4.4 the errorT.stack present but it was not written to show up anywhere in the controller UI. In 4.5 AppDynamics have decided to drop it.
So as a workaround, try using errorT.msg to push in any error details.
Hello there ,
With Adrum.js, can an alarm or error code be generated for forwarding a request to a url to a different url?example malware detection?
JS agent can only report error events.
Can you please elaborate on the problem?
Hi Gaurav ,
it's not a problem, we just want to generate an alarm when a different url is redirected in the malware detection structure.
I want to capture the redirected url in adrum.js.
If you have a BRUM analytics license, then try,
- Create analytics metrics from browser requests events with ADQL filtering such events.
- You can later use the above-defined metric in your Health rule and
- Define alerts for the Health rule.
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form