|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
/*
|
|
|
|
|
* Copyright 2012-2019 the original author or authors.
|
|
|
|
|
* Copyright 2012-2020 the original author or authors.
|
|
|
|
|
*
|
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
@ -20,6 +20,8 @@ import java.time.Duration;
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
import io.micrometer.prometheus.HistogramFlavor;
|
|
|
|
|
|
|
|
|
|
import org.springframework.boot.actuate.metrics.export.prometheus.PrometheusPushGatewayManager.ShutdownOperation;
|
|
|
|
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
|
|
|
|
|
|
|
|
@ -46,6 +48,11 @@ public class PrometheusProperties {
|
|
|
|
|
*/
|
|
|
|
|
private final Pushgateway pushgateway = new Pushgateway();
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Histogram type for backing DistributionSummary and Timer.
|
|
|
|
|
*/
|
|
|
|
|
private HistogramFlavor histogramFlavor = HistogramFlavor.Prometheus;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Step size (i.e. reporting frequency) to use.
|
|
|
|
|
*/
|
|
|
|
@ -59,6 +66,14 @@ public class PrometheusProperties {
|
|
|
|
|
this.descriptions = descriptions;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public HistogramFlavor getHistogramFlavor() {
|
|
|
|
|
return this.histogramFlavor;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setHistogramFlavor(HistogramFlavor histogramFlavor) {
|
|
|
|
|
this.histogramFlavor = histogramFlavor;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Duration getStep() {
|
|
|
|
|
return this.step;
|
|
|
|
|
}
|
|
|
|
|