use of com.newrelic.agent.errors.ErrorAnalyzer in project newrelic-java-agent by newrelic.
the class Transaction method isErrorNotExpected.
/**
* This method should only be called at the END of a transaction, AFTER the application name is finalized.
*/
public boolean isErrorNotExpected() {
int responseStatus = getStatus();
ErrorAnalyzer errorAnalyzer = new ErrorAnalyzerImpl(getAgentConfig().getErrorCollectorConfig());
return !errorAnalyzer.isExpectedError(responseStatus, getThrowable());
}
use of com.newrelic.agent.errors.ErrorAnalyzer in project newrelic-java-agent by newrelic.
the class Transaction method isErrorReportableAndNotIgnored.
/**
* This method should only be called at the END of a transaction, AFTER the application name is finalized.
*/
public boolean isErrorReportableAndNotIgnored() {
ErrorAnalyzer errorAnalyzer = new ErrorAnalyzerImpl(getAgentConfig().getErrorCollectorConfig());
int responseStatus = getStatus();
boolean isReportable = errorAnalyzer.isReportable(responseStatus, getThrowable());
return isReportable && !ignoreErrors && !errorAnalyzer.isIgnoredError(responseStatus, getThrowable() == null ? null : getThrowable().throwable);
}
Aggregations