CRJ-2930 Prometheus Monitoring for Java Web Applications w/o Modifying Source Code | Devoxx

Prometheus Monitoring for Java Web Applications w/o Modifying Source Code

Tools-in-Action

track.4 Server Side Java Intermediate Level

Room 5

Monday from 17:25 til 17:55

The Prometheus monitoring tool follows a white-box monitoring approach: Applications actively provide metrics about their internal state to the Prometheus server. In order to instrument an application with Prometheus metrics, you have to add a metrics library and call that library in the application's source code. However, DevOps teams do not always have the option to modify the source code of the applications they are running.

This talk shows how to instrument Java Web Applications with Prometheus metrics without modifying the application's source code. The implementation uses a variety of lesser-known but useful JVM features and libraries: Java agents, Bytecode manipulation with Byte Buddy, custom class loaders, reflection without loading class dependencies, thread locals, weak references, Docker for running application servers in integration tests. Browsing through the demo code we will learn some interesting facts about module systems in application servers and class loaders in general.

 javaagent    devops    prometheus  
Fabian Stäber Fabian Stäber

Dr. Fabian Stäber is software developer, research and development lead, consultant, architect, at ConSol Software GmbH in Munich, Germany. Fabian is excited about Java server development, distributed systems, operations, and monitoring. His academic research was on decentralized, peer-to-peer-based network architectures.

Floor plans