liveBook · Manning

Prometheus endpoint

As explained in Spring AI in Action

A Prometheus endpoint is an HTTP endpoint that exposes application metrics in a format that Prometheus can scrape.

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

How Spring AI in Action covers it

How deep it goes
Implements dependency, Actuator exposure, container startup, and scrape configuration, stopping short of alerting details.
Examples
Uses /actuator/prometheus, a 15-second scrape interval, Docker Compose, and Prometheus configuration targeting port 8080.
What it assumes
Assumes a Spring Boot application using Actuator and Micrometer, while providing explicit dependency and configuration steps.
What you can do after
Operate/configure Prometheus scraping for metrics exposed by a Spring Boot application.
How it connects
Connects Spring Boot Actuator, Micrometer, Prometheus, Docker Compose, and Grafana.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Spring AI in Action. The section links point to the parts of the book it draws on.