Book Image

Spring Boot Cookbook

By : Alex Antonov
Book Image

Spring Boot Cookbook

By: Alex Antonov

Overview of this book

Table of Contents (15 chapters)
Spring Boot Cookbook
Credits
About the Author
Acknowledgment
About the Reviewers
www.PacktPub.com
Preface
Index

Emitting metrics


The previous recipe has provided us with an overview of the capabilities provided by Spring Boot Actuators. We played with the different management endpoints such as /info, /health, and so on and even created our own health metrics to add to the default set. However, besides the health status there are a number of things that we, as developers and operations folks, want to be able to see and monitor on an ongoing basis, and just knowing that the uplink is functional is not good enough. We also would like to see the number of open sessions, concurrent requests to the application, latency, and so on and so forth. In this recipe, we will learn about the metric reporting facilities in Spring Boot as well as how to add our own metrics and some quick and simple ways of visualizing them.

Getting ready

To help us visualize the metrics better, we will be using a great open source project, spring-boot-admin, located at https://github.com/codecentric/spring-boot-admin. It provides a...