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
Fluent builder for function timer.
-
Method Summary
Modifier and TypeMethodDescriptiondescription
(String description) register
(MeterRegistry registry) Add the function timer to a single registry, or return an existing function timer in that registry.
-
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.
-