Class DistributionStatisticConfigFilter
java.lang.Object
org.apache.camel.component.micrometer.DistributionStatisticConfigFilter
- All Implemented Interfaces:
io.micrometer.core.instrument.config.MeterFilter
public class DistributionStatisticConfigFilter
extends Object
implements io.micrometer.core.instrument.config.MeterFilter
Filter for adding distribution statistics to Timers and Distribution Summaries. Configure and add this to the
MeterRegistry
if desired:
DistributionStatisticConfigFilter filter = new DistributionStatisticConfigFilter() // filter.set... meterRegistry.config().meterFilter(filter)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionandAppliesTo
(Predicate<io.micrometer.core.instrument.Meter.Id> appliesTo) Restrict a condition under which this config applies to a Camel meterio.micrometer.core.instrument.distribution.DistributionStatisticConfig
configure
(io.micrometer.core.instrument.Meter.Id id, io.micrometer.core.instrument.distribution.DistributionStatisticConfig config) orAppliesTo
(Predicate<io.micrometer.core.instrument.Meter.Id> appliesTo) Add a condition under which this config applies to a Camel metersetBufferLength
(Integer bufferLength) setMaximumExpectedDuration
(Duration maximumExpectedDuration) Sets the maximum expected duration for a timer value Controls the number of buckets shipped by publishPercentileHistogram as well as controlling the accuracy and memory footprint of the underlying HdrHistogram structure.setMaximumExpectedValue
(Long maximumExpectedValue) Sets the maximum expected value for a distribution summary value.setMinimumExpectedDuration
(Duration minimumExpectedDuration) Sets the minimum expected duration for a timer value Controls the number of buckets shipped by publishPercentileHistogram as well as controlling the accuracy and memory footprint of the underlying HdrHistogram structure.setMinimumExpectedValue
(Long minimumExpectedValue) Sets the minimum expected value for a distribution summary value.setPercentilePrecision
(Integer percentilePrecision) setPercentiles
(double[] percentiles) Calculate and publish percentile values.setPublishPercentileHistogram
(Boolean publishPercentileHistogram) Whether to publish aggregatable percentile approximations for Prometheus or Atlas.setSlas
(long[] slas) Publish a cumulative histogram with buckets defined by your SLAs.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micrometer.core.instrument.config.MeterFilter
accept, map
-
Constructor Details
-
DistributionStatisticConfigFilter
public DistributionStatisticConfigFilter()
-
-
Method Details
-
configure
public io.micrometer.core.instrument.distribution.DistributionStatisticConfig configure(io.micrometer.core.instrument.Meter.Id id, io.micrometer.core.instrument.distribution.DistributionStatisticConfig config) - Specified by:
configure
in interfaceio.micrometer.core.instrument.config.MeterFilter
-
andAppliesTo
public DistributionStatisticConfigFilter andAppliesTo(Predicate<io.micrometer.core.instrument.Meter.Id> appliesTo) Restrict a condition under which this config applies to a Camel meter- Parameters:
appliesTo
- predicate that must return true so that this config applies
-
orAppliesTo
public DistributionStatisticConfigFilter orAppliesTo(Predicate<io.micrometer.core.instrument.Meter.Id> appliesTo) Add a condition under which this config applies to a Camel meter- Parameters:
appliesTo
- predicate that must return true so that this config applies
-
setMaximumExpectedValue
Sets the maximum expected value for a distribution summary value. Controls the number of buckets shipped by publishPercentileHistogram as well as controlling the accuracy and memory footprint of the underlying HdrHistogram structure.- Parameters:
maximumExpectedValue
- the maximum expected value for a distribution summary value
-
setMinimumExpectedValue
Sets the minimum expected value for a distribution summary value. Controls the number of buckets shipped by publishPercentileHistogram as well as controlling the accuracy and memory footprint of the underlying HdrHistogram structure.- Parameters:
minimumExpectedValue
- the minimum expected value for a distribution summary value
-
setMaximumExpectedDuration
public DistributionStatisticConfigFilter setMaximumExpectedDuration(Duration maximumExpectedDuration) Sets the maximum expected duration for a timer value Controls the number of buckets shipped by publishPercentileHistogram as well as controlling the accuracy and memory footprint of the underlying HdrHistogram structure.- Parameters:
maximumExpectedDuration
- the maximum expected duration for a timer value
-
setMinimumExpectedDuration
public DistributionStatisticConfigFilter setMinimumExpectedDuration(Duration minimumExpectedDuration) Sets the minimum expected duration for a timer value Controls the number of buckets shipped by publishPercentileHistogram as well as controlling the accuracy and memory footprint of the underlying HdrHistogram structure.- Parameters:
minimumExpectedDuration
- the minimum expected duration for a timer value
-
setPublishPercentileHistogram
public DistributionStatisticConfigFilter setPublishPercentileHistogram(Boolean publishPercentileHistogram) Whether to publish aggregatable percentile approximations for Prometheus or Atlas. Has no effect on systems that do not support aggregatable percentile approximations. This defaults to true.- Parameters:
publishPercentileHistogram
- Whether to publish aggregatable percentile approximations.
-
setBufferLength
-
setExpiry
-
setPercentiles
Calculate and publish percentile values. These values are non-aggregatable across dimensions.- Parameters:
percentiles
- array of percentiles to be published
-
setPercentilePrecision
-
setSlas
Publish a cumulative histogram with buckets defined by your SLAs. Used together with publishPercentileHistogram on a monitoring system that supports aggregatable percentiles, this setting adds additional buckets to the published histogram. Used on a system that does not support aggregatable percentiles, this setting causes a histogram to be published with only these buckets.- Parameters:
slas
- array of percentiles to be published
-