B
- builder typepublic abstract class AbstractTimerBuilder<B extends AbstractTimerBuilder<B>>
extends java.lang.Object
Timer
.Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
description |
protected DistributionStatisticConfig.Builder |
distributionConfigBuilder |
protected java.lang.String |
name |
protected PauseDetector |
pauseDetector |
protected Tags |
tags |
Modifier | Constructor and Description |
---|---|
protected |
AbstractTimerBuilder(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
B |
description(java.lang.String description) |
B |
distributionStatisticBufferLength(java.lang.Integer bufferLength)
Statistics emanating from a timer like max, percentiles, and histogram counts decay over time to
give greater weight to recent samples (exception: histogram counts are cumulative for those systems that expect cumulative
histogram buckets).
|
B |
distributionStatisticExpiry(java.time.Duration expiry)
Statistics emanating from a timer like max, percentiles, and histogram counts decay over time to
give greater weight to recent samples (exception: histogram counts are cumulative for those systems that expect cumulative
histogram buckets).
|
B |
maximumExpectedValue(java.time.Duration max)
Sets the maximum value that this timer is expected to observe.
|
B |
minimumExpectedValue(java.time.Duration min)
Sets the minimum value that this timer is expected to observe.
|
B |
pauseDetector(PauseDetector pauseDetector)
Sets the pause detector implementation to use for this timer.
|
B |
percentilePrecision(java.lang.Integer digitsOfPrecision)
Determines the number of digits of precision to maintain on the dynamic range histogram used to compute
percentile approximations.
|
B |
publishPercentileHistogram()
Adds histogram buckets used to generate aggregable percentile approximations in monitoring
systems that have query facilities to do so (e.g.
|
B |
publishPercentileHistogram(java.lang.Boolean enabled)
Adds histogram buckets used to generate aggregable percentile approximations in monitoring
systems that have query facilities to do so (e.g.
|
B |
publishPercentiles(double... percentiles)
Produces an additional time series for each requested percentile.
|
B |
serviceLevelObjectives(java.time.Duration... slos)
Publish at a minimum a histogram containing your defined service level objective (SLO) boundaries.
|
B |
sla(java.time.Duration... sla)
Deprecated.
Use {
serviceLevelObjectives(Duration...) } instead. "Service Level Agreement" is
more formally the agreement between an engineering organization and the business. Service Level Objectives
are set more conservatively than the SLA to provide some wiggle room while still satisfying the business
requirement. SLOs are the threshold we intend to measure against, then. |
B |
tag(java.lang.String key,
java.lang.String value) |
B |
tags(java.lang.Iterable<Tag> tags) |
B |
tags(java.lang.String... tags) |
protected final java.lang.String name
protected Tags tags
protected final DistributionStatisticConfig.Builder distributionConfigBuilder
@Nullable protected java.lang.String description
@Nullable protected PauseDetector pauseDetector
public B tags(java.lang.String... tags)
tags
- Must be an even number of arguments representing key/value pairs of tags.public B tags(java.lang.Iterable<Tag> tags)
tags
- Tags to add to the eventual timer.public B tag(java.lang.String key, java.lang.String value)
key
- The tag key.value
- The tag value.public B publishPercentiles(@Nullable double... percentiles)
publishPercentileHistogram()
to publish a histogram that can be used to generate aggregable percentile approximations.percentiles
- Percentiles to compute and publish. The 95th percentile should be expressed as 0.95
.public B percentilePrecision(@Nullable java.lang.Integer digitsOfPrecision)
digitsOfPrecision
- The digits of precision to maintain for percentile approximations.public B publishPercentileHistogram()
histogram_quantile
,
Atlas' :percentiles
).public B publishPercentileHistogram(@Nullable java.lang.Boolean enabled)
histogram_quantile
,
Atlas' :percentiles
).enabled
- Determines whether percentile histograms should be published.@Deprecated public B sla(@Nullable java.time.Duration... sla)
serviceLevelObjectives(Duration...)
} instead. "Service Level Agreement" is
more formally the agreement between an engineering organization and the business. Service Level Objectives
are set more conservatively than the SLA to provide some wiggle room while still satisfying the business
requirement. SLOs are the threshold we intend to measure against, then.publishPercentileHistogram()
, the boundaries defined
here are included alongside other buckets used to generate aggregable percentile approximations.sla
- Publish SLO boundaries in the set of histogram buckets shipped to the monitoring system.public B serviceLevelObjectives(@Nullable java.time.Duration... slos)
publishPercentileHistogram()
, the boundaries defined
here are included alongside other buckets used to generate aggregable percentile approximations.slos
- Publish SLO boundaries in the set of histogram buckets shipped to the monitoring system.public B minimumExpectedValue(@Nullable java.time.Duration min)
min
- The minimum value that this timer is expected to observe.public B maximumExpectedValue(@Nullable java.time.Duration max)
max
- The maximum value that this timer is expected to observe.public B distributionStatisticExpiry(@Nullable java.time.Duration expiry)
distributionStatisticBufferLength(Integer)
.expiry
- The amount of time samples are accumulated to a histogram before it is reset and rotated.public B distributionStatisticBufferLength(@Nullable java.lang.Integer bufferLength)
distributionStatisticExpiry(Duration)
, with this buffer length.bufferLength
- The number of histograms to keep in the ring buffer.public B pauseDetector(@Nullable PauseDetector pauseDetector)
MeterRegistry.Config.pauseDetector(PauseDetector)
.pauseDetector
- The pause detector implementation to use.NoPauseDetector
,
ClockDriftPauseDetector