public class MetricName extends Object
| Constructor and Description |
|---|
MetricName(String flatString)
Create metric name from flatString
|
MetricName(String name,
MetricLevel metricLevel,
String... tags)
the unique identifier of a metric, include a name and some tags.
|
MetricName(String name,
String... tags) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
MetricLevel |
getMetricLevel() |
String |
getName() |
Map<String,String> |
getTags() |
int |
hashCode() |
void |
setMetricLevel(MetricLevel metricLevel) |
void |
setName(String name) |
void |
setTags(Map<String,String> tags) |
String |
toFlatString()
convert the metric name to flat string
|
String |
toString() |
String[] |
toStringArray()
convert the metric name to string array.
|
public MetricName(String name, MetricLevel metricLevel, String... tags)
name - metric namemetricLevel - metric leveltags - string appear in pairs, like sg="ln",user="user1" will be "sg", "ln", "user",
"user1"public MetricName(String flatString)
public String toFlatString()
public String[] toStringArray()
public String getName()
public void setName(String name)
public MetricLevel getMetricLevel()
public void setMetricLevel(MetricLevel metricLevel)
Copyright © 2022 The Apache Software Foundation. All rights reserved.