Report Errors and Exceptions
You can report exceptions using the method reportError Instrumentation
You can also set one of the severity levels below for an issue. With the severity level, you can filter errors in the Code Issues Dashboard or Code Issues Analyze.
ErrorSeverityLevel.INFOErrorSeverityLevel.WARNINGErrorSeverityLevel.CRITICAL
The example below uses the API to report possible exceptions and sets the severity level to ErrorSeverityLevel.CRITICAL (critical) when writing to a file
using AppDynamics.Agent;
...
try {
// possible exception //
}
catch (Exception e){
Instrumentation.ReportError(exception, ErrorSeverityLevel.CRITICAL);
}