Spring Boot: UI for the dump endpoint

I am really happy with the actuator functionality in Spring Boot applications. It offers some fantastic tools for gaining insight into your application. Some of the REST endpoints that you get – such as health and metrics – are easy to read. Despite the fact that they render as JSON, my guess is that your human eyes still can comprehend it.

But have you ever taken a look at the output from Spring Boot’s dump endpoint?

That’s really not so friendly to read. At least not for my kind of eyes. And perhaps thats okay – if you got some tooling that can parse the thread stack info and show it nicely to you. But chances are that you don’t have that – like I didn’t.

So, a while back, I decided to create a Spring Boot plugin that you just include on the application classpath. Like you do with the Spring Boot starters. This is what you get:

Red lines indicate methods that owns an intrinsic lock (think synchronized in Java land). I added a little gray line above each such event: it tells you what kind of class the intrinsic lock is associated with.

The code is OSS – find it at GitHub. It is also here that you will find some extra documentation on how you can configure the plugin – so check it out if you want to give it a spin.

By the way: It was very interesting to make such a Spring Boot plugin. It uses auto configuration and other cool stuff. If you think that sounds interesting, then look at the code: it is really simple ;).

More from Spring

If you are using the core Spring Framework (that is, not Spring Boot), then you may have encountered a problem where Spring doesn’t seem to completely ignore mocked beans in your tests: Perhaps Spring attempts to inject beans into them or run your @PostConstruct lifecycle methods. In this post I present that problem together with… Continue Reading

In this post I am going to show how to copy MDC data from Web threads to @Async threads using a brand new Spring Framework 4.3 feature: ThreadPoolTaskExecutor#setTaskDecorator() [set-task-decorator]. This is the end result: Notice the third and second last log lines: they have [userId:Duke] just left of the log level. The first line is… Continue Reading

In the context of my favorite framework, Spring Boot, I have recently started to explore the effect of using the Kotlin 1.1 programming language (as an alternative to Java 8). This post describes a few language features that may be interesting to a typical Java 8 developer. Also, I hope you will see that: Spring… Continue Reading

In this post I show how you can create a Spring Boot 1.5 application using Kotlin 1.1 (as opposed to typically Java 8 in these times). The example I’ve created is a typical “Hello World” example. I have chosen to implement a Spring MVC controller – and an awesome Spring Boot integration test. The Gradle… Continue Reading

In this post I show how you can add support for Prometheus in Spring Boot applications. Step 1 of 2: Add the Prometheus Spring Boot Starter You can get Prometheus support in Spring Boot applications via a so-called “starter”. Here is how to get that… It’s a one liner in Gradle: And a five liner… Continue Reading

In this post I show how you, from a Spring Boot application, can control the timezone used by Hibernate when it communicates timestamps with the database. This post is inspired by a very similar recent post by Vlad Mihalcea [1], Hibernate Developer Advocate at Redhat. It’s basically the same subject – but with a Spring Boot… Continue Reading