diff --git a/spring-boot-project/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc b/spring-boot-project/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc index de378ddd35b..8f1c991b38a 100644 --- a/spring-boot-project/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc +++ b/spring-boot-project/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc @@ -1684,6 +1684,24 @@ Here is an example `scrape_config` to add to `prometheus.yml`: - targets: ['HOST:PORT'] ---- +For ephemeral or batch jobs which may not exist long enough to be scraped, +https://github.com/prometheus/pushgateway[Prometheus Pushgateway] support can be used to +expose their metrics to Prometheus. To enable Prometheus Pushgateway support, add the following +dependency to your project: + +[source,xml,indent=0] +---- + + io.prometheus + simpleclient_pushgateway + +---- + +When the Prometheus Pushgateway dependency is present on the classpath, Spring Boot auto-configures +a `PrometheusPushGatewayManager` bean. This manages the pushing of metrics to a Prometheus Pushgateway. +The `PrometheusPushGatewayManager` can be tuned using properties under `management.metrics.export.prometheus.pushgateway`. +For advanced configuration, you can also provide your own `PrometheusPushGatewayManager` bean. + [[production-ready-metrics-export-signalfx]]