Today I simulate an overload of my app an expect an outofmemory error and an invocation of my UncaughtExceptionHandler.
But there's an issue in co.elastic.apm.agent.bci.bytebuddy.ErrorLoggingListener
public void onError(String typeName, ClassLoader classLoader, JavaModule module, boolean loaded, Throwable throwable) {
if (throwable instanceof MinimumClassFileVersionValidator.UnsupportedClassFileVersionException) {
logger.warn("{} uses an unsupported class file version (pre Java 5) and can't be instrumented. " +
"Consider updating to a newer version of that library.", typeName);
} else {
if (throwable.getMessage().contains("Cannot resolve type description")) {
logger.info(typeName + " refers to a missing class", throwable);
} else {
logger.warn("Error on transformation " + typeName, throwable);
}
}
}
IMHO the listener should only listen and not supress exceptions. The entry of ErrorLoggingListener is not in my app logging and I can't see problems in ES logs after.
How did you simulate the overload of your application? Note that this listener does not catch Throwables at any time, only those which occur when currently instrumenting a class.
However, it probably makes sense to re-throw OOMEs.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.