Hi,
I need to instrument a legacy software deployed in JBoss 4.2.3 GA, running on JDK 8 and using Servlet 2.5. It is not possible to upgrade the legacy software to use updated versions of Servlets, JBoss, etc.., but, anyway, we need to put it under APM monitoring.
I understand that Servlet older than 3.0 are not supported (Supported technologies | APM Java Agent Reference [1.x] | Elastic).
I found a warning in the method ServletVersionInstrumentation.logServletVersion(...)
.
In fatc, in the logs I found this warning:
Unsupported servlet version detected: 2.5, no Servlet transaction will be created. Servlet container info = JBossWeb/2.0.1.GA
I also found another warning about classes listed below:
"uses an unsupported class file version (pre Java 4)) and can't be instrumented. Consider updating to a newer version of that library."
org.apache.log4j.Category
org.apache.log4j.WriterAppender
org.hsqldb.jdbc.jdbcConnection
org.hsqldb.jdbc.jdbcStatement
org.hsqldb.jdbc.jdbcPreparedStatement
org.slf4j.Logger
org.slf4j.impl.Log4jLoggerAdapter
org.slf4j.spi.LocationAwareLogger
org.slf4j.helpers.NamedLoggerBase
I would like to write a custom plugin to support Servlets 2.5, starting from the existing apm-servlet-plugin. Any hint how to proceed? Is it even possible to instrument servlets 2.5 writing a custom plugin? In fact, I did not find any method that specifically excludes servlets 2.5.
Thanks