Metric and Metadata that are registered in the MetricRegistry
The MetricID contains:
Name: (Required) The name of the metric.Tags: (Optional) The tags (represented by Tag objects) of the metric. The tag name must match the
regex `[a-zA-Z_][a-zA-Z0-9_]*` (Ascii alphabet, numbers and underscore). The tag value may contain any UTF-8 encoded
character.| Modifier and Type | Field and Description |
|---|---|
| private final String | name
Name of the metric. |
| private final Map | tags
Tags of the metric. |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private void | addTags(Tag[]
an array of tagArray)Tag objectsAdd multiple |
| public int | compareTo(MetricID
the other MetricID other)Implements java. Compares two MetricID objects through the following steps:
|
| public boolean | equals(Object
the reference object with which to compare. o)Overrides java. Indicates whether some other object is "equal to" this one. |
| public String | Returns: the Metric name associated with this MetricIDReturns the Metric name associated with this MetricID |
| public Map | |
| public Tag[] | |
| public List | |
| public String | Returns: a String containing the tagsGets the list of tags as a single String in the format 'key="value",key2="value2",...' |
| public int | |
| public String |
| name | back to summary |
|---|---|
| private final String name Name of the metric. A required field which holds the name of the metric object. | |
| tags | back to summary |
|---|---|
| private final Map<String, String> tags Tags of the metric. | |
| MetricID | back to summary |
|---|---|
| public MetricID(String name) Constructs a MetricID with the given metric name and no tags. If global tags are available then they will be appended to this MetricID.
| |
| MetricID | back to summary |
|---|---|
| public MetricID(String name, Tag... tags) Constructs a MetricID with the given metric name and | |
| addTag | back to summary |
|---|---|
| private void addTag(Tag tag) Adds a singular | |
| addTags | back to summary |
|---|---|
| private void addTags(Tag[] tagArray) Add multiple | |
| compareTo | back to summary |
|---|---|
| public int compareTo(MetricID other) Implements java. Compares two MetricID objects through the following steps:
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getName | back to summary |
|---|---|
| public String getName() Returns the Metric name associated with this MetricID
| |
| getTags | back to summary |
|---|---|
| public Map Returns the underlying map containing the tags. | |
| getTagsAsArray | back to summary |
|---|---|
| public Tag[] getTagsAsArray() Gets the list of tags as an array of
| |
| getTagsAsList | back to summary |
|---|---|
| public List Gets the list of tags as a list of | |
| getTagsAsString | back to summary |
|---|---|
| public String getTagsAsString() Gets the list of tags as a single String in the format 'key="value",key2="value2",...'
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |