Constructor and Description |
---|
More() |
Modifier and Type | Method and Description |
---|---|
<T extends Number> |
counter(String name,
Iterable<Tag> tags,
T number)
Tracks a number, maintaining a weak reference on it.
|
<T> FunctionCounter |
counter(String name,
Iterable<Tag> tags,
T obj,
ToDoubleFunction<T> countFunction)
Tracks a monotonically increasing value, automatically incrementing the counter whenever
the value is observed.
|
LongTaskTimer |
longTaskTimer(String name,
Iterable<Tag> tags)
Measures the time taken for long tasks.
|
LongTaskTimer |
longTaskTimer(String name,
String... tags)
Measures the time taken for long tasks.
|
<T> TimeGauge |
timeGauge(String name,
Iterable<Tag> tags,
T obj,
TimeUnit timeFunctionUnit,
ToDoubleFunction<T> timeFunction)
A gauge that tracks a time value, to be scaled to the monitoring system's base time unit.
|
<T> FunctionTimer |
timer(String name,
Iterable<Tag> tags,
T obj,
ToLongFunction<T> countFunction,
ToDoubleFunction<T> totalTimeFunction,
TimeUnit totalTimeFunctionUnit)
A timer that tracks monotonically increasing functions for count and totalTime.
|
public LongTaskTimer longTaskTimer(String name, String... tags)
name
- Name of the gauge being registered.tags
- MUST be an even number of arguments representing key/value pairs of tags.public LongTaskTimer longTaskTimer(String name, Iterable<Tag> tags)
name
- Name of the gauge being registered.tags
- Sequence of dimensions for breaking down the name.public <T> FunctionCounter counter(String name, Iterable<Tag> tags, T obj, ToDoubleFunction<T> countFunction)
T
- The type of the state object from which the counter value is extracted.name
- Name of the gauge being registered.tags
- Sequence of dimensions for breaking down the name.obj
- State object used to compute a value.countFunction
- Function that produces a monotonically increasing counter value from the state object.public <T extends Number> FunctionCounter counter(String name, Iterable<Tag> tags, T number)
T
- The type of the state object from which the counter value is extracted.name
- Name of the gauge being registered.tags
- Sequence of dimensions for breaking down the name.number
- A monotonically increasing number to track.public <T> TimeGauge timeGauge(String name, Iterable<Tag> tags, T obj, TimeUnit timeFunctionUnit, ToDoubleFunction<T> timeFunction)
T
- The type of the state object from which the gauge value is extracted.name
- Name of the gauge being registered.tags
- Sequence of dimensions for breaking down the name.obj
- State object used to compute a value.timeFunctionUnit
- The base unit of time produced by the total time function.timeFunction
- Function that produces a time value from the state object. This value may increase and decrease over time.public <T> FunctionTimer timer(String name, Iterable<Tag> tags, T obj, ToLongFunction<T> countFunction, ToDoubleFunction<T> totalTimeFunction, TimeUnit totalTimeFunctionUnit)
T
- The type of the state object from which the function values are extracted.name
- Name of the gauge being registered.tags
- Sequence of dimensions for breaking down the name.obj
- State object used to compute a value.countFunction
- Function that produces a monotonically increasing counter value from the state object.totalTimeFunction
- Function that produces a monotonically increasing total time value from the state object.totalTimeFunctionUnit
- The base unit of time produced by the total time function.Copyright © 2018. All rights reserved.