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