Package io.micrometer.core.instrument
Class FunctionTimer.Builder<T>
java.lang.Object
io.micrometer.core.instrument.FunctionTimer.Builder<T>
- Type Parameters:
T
- The type of the state object from which the timer values are extracted.
- Enclosing interface:
- FunctionTimer
public static class FunctionTimer.Builder<T>
extends java.lang.Object
Fluent builder for function timer.
-
Method Summary
Modifier and Type Method Description FunctionTimer.Builder<T>
description(java.lang.String description)
FunctionTimer
register(MeterRegistry registry)
Add the function timer to a single registry, or return an existing function timer in that registry.FunctionTimer.Builder<T>
tag(java.lang.String key, java.lang.String value)
FunctionTimer.Builder<T>
tags(java.lang.Iterable<Tag> tags)
FunctionTimer.Builder<T>
tags(java.lang.String... tags)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Method Details
-
tags
- Parameters:
tags
- Must be an even number of arguments representing key/value pairs of tags.- Returns:
- The function timer builder with added tags.
-
tags
- Parameters:
tags
- Tags to add to the eventual function timer.- Returns:
- The function timer builder with added tags.
-
tag
- Parameters:
key
- The tag key.value
- The tag value.- Returns:
- The function timer builder with a single added tag.
-
description
- Parameters:
description
- Description text of the eventual function timer.- Returns:
- The function timer builder with added description.
-
register
Add the function timer to a single registry, or return an existing function timer in that registry. The returned function timer will be unique for each registry, but each registry is guaranteed to only create one function timer for the same combination of name and tags.- Parameters:
registry
- A registry to add the function timer to, if it doesn't already exist.- Returns:
- A new or existing function timer.
-