| Modifier and Type | Method and Description |
|---|---|
Gauge.Builder<T> |
baseUnit(String unit) |
Gauge.Builder<T> |
description(String description) |
Gauge |
register(MeterRegistry registry)
Add the gauge to a single registry, or return an existing gauge in that registry.
|
Gauge.Builder<T> |
strongReference(boolean strong)
Indicates that the gauge should maintain a strong reference on the object upon which
its instantaneous value is determined.
|
Gauge.Builder<T> |
synthetic(Meter.Id syntheticAssociation)
For internal use.
|
Gauge.Builder<T> |
tag(String key,
String value) |
Gauge.Builder<T> |
tags(Iterable<Tag> tags) |
Gauge.Builder<T> |
tags(String... tags) |
public Gauge.Builder<T> tags(String... tags)
tags - Must be an even number of arguments representing key/value pairs of tags.public Gauge.Builder<T> tags(Iterable<Tag> tags)
tags - Tags to add to the eventual gauge.public Gauge.Builder<T> tag(String key, String value)
key - The tag key.value - The tag value.public Gauge.Builder<T> description(@Nullable String description)
description - Description text of the eventual gauge.public Gauge.Builder<T> baseUnit(@Nullable String unit)
unit - Base unit of the eventual gauge.@Incubating(since="1.1.0") public Gauge.Builder<T> synthetic(Meter.Id syntheticAssociation)
HistogramGauges are derivatives of a Timer or
DistributionSummary.
This method may be removed in future minor or major releases if we find a way to mark derivatives in a private way that does not have other API compatibility consequences.
syntheticAssociation - The meter id of a meter for which this metric is a synthetic derivative.@Incubating(since="1.1.0") public Gauge.Builder<T> strongReference(boolean strong)
strong - Whether or not to maintain a strong reference on the gauged object.public Gauge register(MeterRegistry registry)
registry - A registry to add the gauge to, if it doesn't already exist.Copyright © 2020 LeanCloud. All rights reserved.