This is a quick prototype playing with the Java Flight Recorder (JFR) event streaming api in Java 14. The project can be used as a java agent to receive events and send them to Elastic Search.
The JDK mission control console is great for local projects are if you can reach the correct ports. This isn't always feasible. This is an example of how this data could be exported to a centrally managed search engine.
I wanted to use the official ElasticSearch client jar for convenience. Clone the repository and build a fat jar to use as a java agent :
./gradlew shadowJar
Start your Java application and pass it the agent
java -javaagent:flight-attendant/build/libs/flight-attendant-all.jar -jar my-app.jar