Class PrometheusPushGatewayManager
java.lang.Object
org.springframework.boot.actuate.metrics.export.prometheus.PrometheusPushGatewayManager
Class that can be used to manage the pushing of metrics to a
Prometheus PushGateway. Handles the scheduling of push operations, error handling and
shutdown operations.- Since:
- 2.1.0
- Author:
- David J. M. Karlsen, Phillip Webb
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe operation that should be performed on shutdown. -
Constructor Summary
ConstructorsConstructorDescriptionPrometheusPushGatewayManager(io.prometheus.metrics.exporter.pushgateway.PushGateway pushGateway, Duration pushRate, PrometheusPushGatewayManager.ShutdownOperation shutdownOperation) Create a newPrometheusPushGatewayManagerinstance. -
Method Summary
Modifier and TypeMethodDescriptionvoidshutdown()Shutdown the manager, running anyPrometheusPushGatewayManager.ShutdownOperation.
-
Constructor Details
-
PrometheusPushGatewayManager
public PrometheusPushGatewayManager(io.prometheus.metrics.exporter.pushgateway.PushGateway pushGateway, Duration pushRate, PrometheusPushGatewayManager.ShutdownOperation shutdownOperation) Create a newPrometheusPushGatewayManagerinstance.- Parameters:
pushGateway- the source push gatewaypushRate- the rate at which push operations occurshutdownOperation- the shutdown operation that should be performed when context is closed- Since:
- 3.5.0
-
-
Method Details
-
shutdown
public void shutdown()Shutdown the manager, running anyPrometheusPushGatewayManager.ShutdownOperation.
-