Apache Sirona java monitoring solution provides a javaagent. Its original purpose is to let Sirona itself instrument JVM or user classes to get metrics on execution time or execution stacks (what sirona calls path tracking). However API is open enough to be reused for totally different purposes. Let’s see how to use it to serve your own transversal needs.
To take a concrete example we will use Sirona javaagent to add a header to a HttpUrlConnection.
Java 8 went out few weeks ago and the question of monitoring is already here. Apache Sirona has several monitoring/interception flavors like CDI, Spring, JavaAgent…but the most interesting is the javaagent which doesn’t mandate to be integrated with a particular technology.
Since it instruments bytecode the question of Java 8 compatibility is important.
Apache Sirona is a brand new project in Apache Software foundation world. It targets Java applications monitoring. One awesome feature of this library is the fact the reporting GUI is easily extensible and you don’t need to write tons of code/pages to add your info in this GUI.
Here is a sample simply reporting the JVM system properties.