public static class Timer.Builder extends AbstractTimerBuilder<Timer.Builder>
description, distributionConfigBuilder, name, pauseDetector, tags
Modifier and Type | Method and Description |
---|---|
Timer.Builder |
description(java.lang.String description) |
Timer.Builder |
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).
|
Timer.Builder |
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).
|
Timer.Builder |
maximumExpectedValue(java.time.Duration max)
Sets the maximum value that this timer is expected to observe.
|
Timer.Builder |
minimumExpectedValue(java.time.Duration min)
Sets the minimum value that this timer is expected to observe.
|
Timer.Builder |
pauseDetector(PauseDetector pauseDetector)
Sets the pause detector implementation to use for this timer.
|
Timer.Builder |
percentilePrecision(java.lang.Integer digitsOfPrecision)
Determines the number of digits of precision to maintain on the dynamic range histogram used to compute
percentile approximations.
|
Timer.Builder |
publishPercentileHistogram()
Adds histogram buckets used to generate aggregable percentile approximations in monitoring
systems that have query facilities to do so (e.g.
|
Timer.Builder |
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.
|
Timer.Builder |
publishPercentiles(double... percentiles)
Produces an additional time series for each requested percentile.
|
Timer |
register(MeterRegistry registry)
Add the timer to a single registry, or return an existing timer in that registry.
|
Timer.Builder |
serviceLevelObjectives(java.time.Duration... slos)
Publish at a minimum a histogram containing your defined service level objective (SLO) boundaries.
|
Timer.Builder |
sla(java.time.Duration... sla)
Publish at a minimum a histogram containing your defined service level objective (SLO) boundaries.
|
Timer.Builder |
tag(java.lang.String key,
java.lang.String value) |
Timer.Builder |
tags(java.lang.Iterable<Tag> tags) |
Timer.Builder |
tags(java.lang.String... tags) |
public Timer.Builder tags(java.lang.String... tags)
tags
in class AbstractTimerBuilder<Timer.Builder>
tags
- Must be an even number of arguments representing key/value pairs of tags.public Timer.Builder tags(java.lang.Iterable<Tag> tags)
tags
in class AbstractTimerBuilder<Timer.Builder>
tags
- Tags to add to the eventual timer.public Timer.Builder tag(java.lang.String key, java.lang.String value)
tag
in class AbstractTimerBuilder<Timer.Builder>
key
- The tag key.value
- The tag value.public Timer.Builder publishPercentiles(double... percentiles)
AbstractTimerBuilder
AbstractTimerBuilder.publishPercentileHistogram()
to publish a histogram that can be used to generate aggregable percentile approximations.publishPercentiles
in class AbstractTimerBuilder<Timer.Builder>
percentiles
- Percentiles to compute and publish. The 95th percentile should be expressed as 0.95
.public Timer.Builder percentilePrecision(java.lang.Integer digitsOfPrecision)
AbstractTimerBuilder
percentilePrecision
in class AbstractTimerBuilder<Timer.Builder>
digitsOfPrecision
- The digits of precision to maintain for percentile approximations.public Timer.Builder publishPercentileHistogram()
AbstractTimerBuilder
histogram_quantile
,
Atlas' :percentiles
).publishPercentileHistogram
in class AbstractTimerBuilder<Timer.Builder>
public Timer.Builder publishPercentileHistogram(java.lang.Boolean enabled)
AbstractTimerBuilder
histogram_quantile
,
Atlas' :percentiles
).publishPercentileHistogram
in class AbstractTimerBuilder<Timer.Builder>
enabled
- Determines whether percentile histograms should be published.public Timer.Builder sla(java.time.Duration... sla)
AbstractTimerBuilder
AbstractTimerBuilder.publishPercentileHistogram()
, the boundaries defined
here are included alongside other buckets used to generate aggregable percentile approximations.sla
in class AbstractTimerBuilder<Timer.Builder>
sla
- Publish SLO boundaries in the set of histogram buckets shipped to the monitoring system.public Timer.Builder serviceLevelObjectives(java.time.Duration... slos)
AbstractTimerBuilder
AbstractTimerBuilder.publishPercentileHistogram()
, the boundaries defined
here are included alongside other buckets used to generate aggregable percentile approximations.serviceLevelObjectives
in class AbstractTimerBuilder<Timer.Builder>
slos
- Publish SLO boundaries in the set of histogram buckets shipped to the monitoring system.public Timer.Builder minimumExpectedValue(java.time.Duration min)
AbstractTimerBuilder
minimumExpectedValue
in class AbstractTimerBuilder<Timer.Builder>
min
- The minimum value that this timer is expected to observe.public Timer.Builder maximumExpectedValue(java.time.Duration max)
AbstractTimerBuilder
maximumExpectedValue
in class AbstractTimerBuilder<Timer.Builder>
max
- The maximum value that this timer is expected to observe.public Timer.Builder distributionStatisticExpiry(java.time.Duration expiry)
AbstractTimerBuilder
AbstractTimerBuilder.distributionStatisticBufferLength(Integer)
.distributionStatisticExpiry
in class AbstractTimerBuilder<Timer.Builder>
expiry
- The amount of time samples are accumulated to a histogram before it is reset and rotated.public Timer.Builder distributionStatisticBufferLength(java.lang.Integer bufferLength)
AbstractTimerBuilder
AbstractTimerBuilder.distributionStatisticExpiry(Duration)
, with this buffer length.distributionStatisticBufferLength
in class AbstractTimerBuilder<Timer.Builder>
bufferLength
- The number of histograms to keep in the ring buffer.public Timer.Builder pauseDetector(PauseDetector pauseDetector)
AbstractTimerBuilder
MeterRegistry.Config.pauseDetector(PauseDetector)
.pauseDetector
in class AbstractTimerBuilder<Timer.Builder>
pauseDetector
- The pause detector implementation to use.NoPauseDetector
,
ClockDriftPauseDetector
public Timer.Builder description(java.lang.String description)
description
in class AbstractTimerBuilder<Timer.Builder>
description
- Description text of the eventual timer.public Timer register(MeterRegistry registry)
registry
- A registry to add the timer to, if it doesn't already exist.