B - Builder for a given metric class.M - Metric class.public static interface Metric.Builder<B extends Metric.Builder<B,M>,M extends Metric>
| Modifier and Type | Method and Description |
|---|---|
B |
description(String description)
Set the description of the metric.
|
M |
register()
Create and register the metric with the default registry.
|
M |
register(MetricRegistry registry)
Create and register the metric with the given registry.
|
B |
tag(String key,
String value)
Add tags to this metric.
|
B |
tags(Iterable<Tag> tags)
Add tags to this metric.
|
B |
tags(Map<String,String> tags)
Add tags to this metric.
|
B |
tags(String... keyValues)
Add tags to this metric.
|
B description(String description)
description - The description of the metric.B tags(String... keyValues)
keyValues - Must be an even number of arguments representing key/value pairs of tags.B tags(Iterable<Tag> tags)
tags - Tags to add to the metricsB tag(String key, String value)
key - The tag key.value - The tag value.B tags(Map<String,String> tags)
tags - A map of key value pairs to be used as tagsM register()
M register(MetricRegistry registry)
registry - MetricRegistry to be usedCopyright © 2018 WSO2. All rights reserved.