Modifier and Type | Method and Description |
---|---|
Counter.Builder |
baseUnit(String unit) |
Counter.Builder |
description(String description) |
Counter |
register(MeterRegistry registry)
Add the counter to a single registry, or return an existing counter in that registry.
|
Counter.Builder |
tag(String key,
String value) |
Counter.Builder |
tags(Iterable<Tag> tags) |
Counter.Builder |
tags(String... tags) |
public Counter.Builder tags(String... tags)
tags
- Must be an even number of arguments representing key/value pairs of tags.public Counter.Builder tags(Iterable<Tag> tags)
tags
- Tags to add to the eventual counter.public Counter.Builder tag(String key, String value)
key
- The tag key.value
- The tag value.public Counter.Builder description(@Nullable String description)
description
- Description text of the eventual counter.public Counter.Builder baseUnit(@Nullable 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.Copyright © 2018. All rights reserved.