I have been exploring the native-image with one of my applications. In the current architecture of my application, it's an akka-grpc
powered java
app that publishes messages to Kafka
. I have been using the apache-kafka
library as a Kafka producer client. My application has a large memory footprint, so I've been exploring the native-image
feature from GraalVM. With native image, my new application requires 1/8
th of resources than the previous version - this a great win for me. But... I'm losing metrics.
I've been using cinnamon, a Lightbend's telemetry metrics tool which provides me observability for the grpc, the JMX provides me metrics for the GC and Dispatchers [i.e. number of loaded class, number of thread running, etc.] and I also get metrics for apache-kafka client (i.e. success and error rate for message publishing, message bytes size, latency, retries, apache-kafka queue size, etc.)
I cannot get any of the metrics with the new version of my application, i.e., with the native image. I reckon for JMX to work it requires JVM and Java bytecode which is no longer present in the native executable. I can sacrifice some of the metrics from JMX but is there a way I can get the Kafka and the grpc metrics?
Would anyone be kind enough to point me to some tools I can use to get the above metrics?