Search in sources :

Example 1 with ErrorAnalyzer

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());
}
Also used : ErrorAnalyzer(com.newrelic.agent.errors.ErrorAnalyzer) ErrorAnalyzerImpl(com.newrelic.agent.errors.ErrorAnalyzerImpl)

Example 2 with ErrorAnalyzer

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);
}
Also used : ErrorAnalyzer(com.newrelic.agent.errors.ErrorAnalyzer) ErrorAnalyzerImpl(com.newrelic.agent.errors.ErrorAnalyzerImpl)

Aggregations

ErrorAnalyzer (com.newrelic.agent.errors.ErrorAnalyzer)2 ErrorAnalyzerImpl (com.newrelic.agent.errors.ErrorAnalyzerImpl)2