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 theMeterRegistry
if desired:DistributionStatisticConfigFilter filter = new DistributionStatisticConfigFilter() // filter.set... meterRegistry.config().meterFilter(filter)
-
-
Constructor Summary
Constructors Constructor Description DistributionStatisticConfigFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DistributionStatisticConfigFilter
andAppliesTo(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)
DistributionStatisticConfigFilter
orAppliesTo(Predicate<io.micrometer.core.instrument.Meter.Id> appliesTo)
Add a condition under which this config applies to a Camel meterDistributionStatisticConfigFilter
setBufferLength(Integer bufferLength)
DistributionStatisticConfigFilter
setExpiry(Duration expiry)
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.DistributionStatisticConfigFilter
setMaximumExpectedValue(Long maximumExpectedValue)
Sets the maximum expected value for a distribution summary value.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.DistributionStatisticConfigFilter
setMinimumExpectedValue(Long minimumExpectedValue)
Sets the minimum expected value for a distribution summary value.DistributionStatisticConfigFilter
setPercentilePrecision(Integer percentilePrecision)
DistributionStatisticConfigFilter
setPercentiles(double[] percentiles)
Calculate and publish percentile values.DistributionStatisticConfigFilter
setPublishPercentileHistogram(Boolean publishPercentileHistogram)
Whether to publish aggregatable percentile approximations for Prometheus or Atlas.DistributionStatisticConfigFilter
setSlas(long[] slas)
Publish a cumulative histogram with buckets defined by your SLAs.
-
-
-
Method Detail
-
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
public DistributionStatisticConfigFilter setMaximumExpectedValue(Long maximumExpectedValue)
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
public DistributionStatisticConfigFilter setMinimumExpectedValue(Long minimumExpectedValue)
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
public DistributionStatisticConfigFilter setBufferLength(Integer bufferLength)
-
setExpiry
public DistributionStatisticConfigFilter setExpiry(Duration expiry)
-
setPercentiles
public DistributionStatisticConfigFilter setPercentiles(double[] percentiles)
Calculate and publish percentile values. These values are non-aggregatable across dimensions.- Parameters:
percentiles
- array of percentiles to be published
-
setPercentilePrecision
public DistributionStatisticConfigFilter setPercentilePrecision(Integer percentilePrecision)
-
setSlas
public DistributionStatisticConfigFilter setSlas(long[] slas)
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
-
-