Modifier and Type | Method and Description |
---|---|
Counter.Builder |
baseUnit(String unit)
Associate a BaseUnit with the Counter
|
Counter.Builder |
description(String description)
Associate a description with the Counter
|
Counter.Builder |
hierarchicalName(String hierarchicalName) |
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)
Add String-value pair of tags to a Counter
|
Counter.Builder |
tags(Iterable<Tag> tags)
Add tags to a Counter in Iterable form
|
Counter.Builder |
tags(String... tags)
Add tags to a Counter as an ellipsis of Tag
|
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.Builder hierarchicalName(String hierarchicalName)
hierarchicalName
- the hierarchical representation of the meter namepublic Counter register(MeterRegistry registry)
registry
- A registry to add the counter to, if it doesn't already exist.Copyright 2011-2017 ForgeRock AS.