T
- The type of the state object from which the counter value is extracted.public static class FunctionCounter.Builder<T> extends Object
Modifier and Type | Method and Description |
---|---|
FunctionCounter.Builder<T> |
baseUnit(String unit) |
FunctionCounter.Builder<T> |
description(String description) |
FunctionCounter |
register(MeterRegistry registry)
Add the function counter to a single registry, or return an existing function counter in that registry.
|
FunctionCounter.Builder<T> |
tag(String key,
String value) |
FunctionCounter.Builder<T> |
tags(Iterable<Tag> tags) |
FunctionCounter.Builder<T> |
tags(String... tags) |
public FunctionCounter.Builder<T> tags(String... tags)
tags
- Must be an even number of arguments representing key/value pairs of tags.public FunctionCounter.Builder<T> tags(Iterable<Tag> tags)
tags
- Tags to add to the eventual function counter.public FunctionCounter.Builder<T> tag(String key, String value)
key
- The tag key.value
- The tag value.public FunctionCounter.Builder<T> description(@Nullable String description)
description
- Description text of the eventual function counter.public FunctionCounter.Builder<T> baseUnit(@Nullable String unit)
unit
- Base unit of the eventual counter.public FunctionCounter register(MeterRegistry registry)
registry
- A registry to add the function counter to, if it doesn't already exist.Copyright © 2018. All rights reserved.