uber-common / jvm-profiler

JVM Profiler Sending Metrics to Kafka, Console Output or Custom Reporter
Other
1.78k stars 342 forks source link

Is it possible to integrate it with Spring MVC + Tomcat app #18

Closed beginner closed 5 years ago

beginner commented 6 years ago

Is it possible to integrate it with Spring MVC + Tomcat app

felixcheung commented 6 years ago

Quite possible? I don't think that has been attempted, yet.

beginner commented 6 years ago

Same run time VM args worked for me, without specifying any main class. Now I can see data published to Kafka topic. Any recommendation on how to make sense out of the data published to kafka?

felixcheung commented 6 years ago

did you check out the guide https://eng.uber.com/jvm-profiler/ ?

hiboyang commented 6 years ago

@beginner there are several ways you could query data in Kafka:

  1. KSQL: https://www.confluent.io/blog/ksql-open-source-streaming-sql-for-apache-kafka/

  2. Write a streaming job using Spark Stream or Flink, read the Kafka topics and save to Hadoop or database.

We use the second approach internally. If you want, you could also write a customer reporter in the jvm-profiler and write metrics to your database.

misasagi1988 commented 6 years ago

same question: Is it possible to integrate it with Spring Boot application?

hiboyang commented 6 years ago

Hi misasagi1988, yes, it is possible. You could add "-javaagent:jvm-profiler-0.0.9.jar" argument to the java command which starts your Sparing Boot application.