Monitoring Spring Boot with Prometheus & Grafana

Published: May 2025

In a distributed system, monitoring is essential. This post shows how to expose metrics from a Spring Boot application and visualize them with Grafana.

Setup

Configuration

management.endpoints.web.exposure.include=prometheus
management.endpoint.prometheus.enabled=true

Use Prometheus to scrape metrics from /actuator/prometheus. Grafana will read from Prometheus and render dashboards.