Not a customer? Click the 'Start a free trial' link to begin a 30-day SaaS trial of our product and to join our community.
Existing Cisco AppDynamics customers should click the 'Sign In' button to authenticate to access the community
on 09-19-2017 09:48 AM - edited on 10-12-2018 02:33 PM by Nina.Wolinsky
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.
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:
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?
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');
Hi Kishore,
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.
See, https://docs.appdynamics.com/display/PRO45/Report+Events+with+the+JavaScript+API
So as a workaround, try using errorT.msg to push in any error details.
Regards,
Gaurav
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?
Hi Halik
JS agent can only report error events.
Can you please elaborate on the problem?
Regards,
Gaurav
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.
Hi Haluk,
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.
Regards,
Gaurav
Thank you! Your submission has been received!
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form