Search code examples
spring-webfluxjava-melody

Does javamelody work with spring webflux?


can anyone point me to a resource, how I can get spring-webflux and javamelody to work together? Seems, that a servletcontext is neccessary for startup, which I don't have/need.

I'm aware of the coll metrics stuff, that comes with spring-boot 2.x, but I don't have anything to display the metrics with, and am locked to a company environment, where just installing something isn't a valid option.

Thanks, Henning


Solution

  • javamelody is mainly based on monitoring of memory, cpu, http requests, sql requests and spring components among other things. See javamelody-spring-boot-starter for example.

    But as far as I know, Spring webflux does not use the servlet api. So what do you want to monitor?

    If you just want to have graphs in a browser, then start a http server for javamelody reports like in standalone. And if you also want to monitor sql requests and spring components, then add in your application all methods from this example, except monitoringSessionListener and monitoringFilter.

    A new spring-boot-starter for javamelody in webflux could be created if it makes sense.