public final class MetricsUtil extends Object
[tag1=value1,tag2=value2,...]
Modifier and Type | Method and Description |
---|---|
static boolean |
containsSpecialCharacters(String namePart) |
static String |
escapeMetricNamePart(String namePart)
Escapes a user-supplied string value that is to be used as metrics key
tag or value.
|
static List<Map.Entry<String,String>> |
parseMetricName(String metricName)
Parses metric name in tagged format into a list of tag-value tuples.
|
@Nonnull public static String escapeMetricNamePart(@Nonnull String namePart)
Prefixes comma (","
), equals sign ("="
) and backslash
("\"
) with another backslash.
public static boolean containsSpecialCharacters(String namePart)
@Nonnull public static List<Map.Entry<String,String>> parseMetricName(@Nonnull String metricName)
IllegalArgumentException
- if the metricName format is invalid
(missing square bracket, invalid escape, empty tag name...)Copyright © 2022 Hazelcast, Inc.. All Rights Reserved.