public class PrometheusPushGatewayManager extends Object
Prometheus PushGateway
. Handles the scheduling of push operations, error handling and
shutdown operations.Modifier and Type | Class and Description |
---|---|
static class |
PrometheusPushGatewayManager.ShutdownOperation
The operation that should be performed on shutdown.
|
Constructor and Description |
---|
PrometheusPushGatewayManager(io.prometheus.client.exporter.PushGateway pushGateway,
io.prometheus.client.CollectorRegistry registry,
Duration pushRate,
String job,
Map<String,String> groupingKeys,
PrometheusPushGatewayManager.ShutdownOperation shutdownOperation)
Create a new
PrometheusPushGatewayManager instance using a single threaded
TaskScheduler . |
PrometheusPushGatewayManager(io.prometheus.client.exporter.PushGateway pushGateway,
io.prometheus.client.CollectorRegistry registry,
org.springframework.scheduling.TaskScheduler scheduler,
Duration pushRate,
String job,
Map<String,String> groupingKey,
PrometheusPushGatewayManager.ShutdownOperation shutdownOperation)
Create a new
PrometheusPushGatewayManager instance. |
Modifier and Type | Method and Description |
---|---|
void |
shutdown()
Shutdown the manager, running any
PrometheusPushGatewayManager.ShutdownOperation . |
public PrometheusPushGatewayManager(io.prometheus.client.exporter.PushGateway pushGateway, io.prometheus.client.CollectorRegistry registry, Duration pushRate, String job, Map<String,String> groupingKeys, PrometheusPushGatewayManager.ShutdownOperation shutdownOperation)
PrometheusPushGatewayManager
instance using a single threaded
TaskScheduler
.pushGateway
- the source push gatewayregistry
- the collector registry to pushpushRate
- the rate at which push operations occurjob
- the job ID for the operationgroupingKeys
- an optional set of grouping keys for the operationshutdownOperation
- the shutdown operation that should be performed when
context is closed.public PrometheusPushGatewayManager(io.prometheus.client.exporter.PushGateway pushGateway, io.prometheus.client.CollectorRegistry registry, org.springframework.scheduling.TaskScheduler scheduler, Duration pushRate, String job, Map<String,String> groupingKey, PrometheusPushGatewayManager.ShutdownOperation shutdownOperation)
PrometheusPushGatewayManager
instance.pushGateway
- the source push gatewayregistry
- the collector registry to pushscheduler
- the scheduler used for operationspushRate
- the rate at which push operations occurjob
- the job ID for the operationgroupingKey
- an optional set of grouping keys for the operationshutdownOperation
- the shutdown operation that should be performed when
context is closed.public void shutdown()
PrometheusPushGatewayManager.ShutdownOperation
.Copyright © 2020 Pivotal Software, Inc.. All rights reserved.