Package io.opentelemetry.api.internal
Class StringUtils
- java.lang.Object
-
- io.opentelemetry.api.internal.StringUtils
-
@Immutable public final class StringUtils extends Object
Internal utility methods for working with attribute keys, attribute values, and metric names.
-
-
Field Summary
Fields Modifier and Type Field Description static int
METRIC_NAME_MAX_LENGTH
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isPrintableString(String str)
Determines whether theString
contains only printable characters.static boolean
isValidMetricName(String metricName)
Determines whether the metric name contains a valid metric name.
-
-
-
Field Detail
-
METRIC_NAME_MAX_LENGTH
public static final int METRIC_NAME_MAX_LENGTH
- See Also:
- Constant Field Values
-
-
Method Detail
-
isPrintableString
public static boolean isPrintableString(String str)
Determines whether theString
contains only printable characters.- Parameters:
str
- theString
to be validated.- Returns:
- whether the
String
contains only printable characters.
-
isValidMetricName
public static boolean isValidMetricName(String metricName)
Determines whether the metric name contains a valid metric name.- Parameters:
metricName
- the metric name to be validated.- Returns:
- whether the metricName contains a valid name.
-
-