public static class Counter.Builder
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
Counter.Builder |
baseUnit(java.lang.String unit) |
Counter.Builder |
description(java.lang.String description) |
Counter |
register(MeterRegistry registry)
Add the counter to a single registry, or return an existing counter in that registry.
|
Counter.Builder |
tag(java.lang.String key,
java.lang.String value) |
Counter.Builder |
tags(java.lang.Iterable<Tag> tags) |
Counter.Builder |
tags(java.lang.String... tags) |
public Counter.Builder tags(java.lang.String... tags)
tags - Must be an even number of arguments representing key/value pairs of tags.public Counter.Builder tags(java.lang.Iterable<Tag> tags)
tags - Tags to add to the eventual counter.public Counter.Builder tag(java.lang.String key, java.lang.String value)
key - The tag key.value - The tag value.public Counter.Builder description(@Nullable java.lang.String description)
description - Description text of the eventual counter.public Counter.Builder baseUnit(@Nullable java.lang.String unit)
unit - Base unit of the eventual counter.public Counter register(MeterRegistry registry)
registry - A registry to add the counter to, if it doesn't already exist.