A Prometheus endpoint exposes application and Spring AI metrics through Spring Boot Actuator and Micrometer so Prometheus can scrape them periodically. section 9.2
services:
# ...
prometheus:
image: prom/prometheus
container_name: prometheus
volumes:
- "./prometheus-config.yml:/etc/prometheus/prometheus.yml"
networks:
- net
ports:
- 9090:9090
networks:
net:
driver: bridge
Run Prometheus for development with Docker Compose, expose port 9090, and mount the scrape configuration into the container. section 9.2
