Class NameUtils
- java.lang.Object
-
- org.commonjava.o11yphant.metrics.util.NameUtils
-
public class NameUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description NameUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringgetDefaultName(Class<?> declaringClass, String method)Get default metric name.static StringgetName(String nodePrefix, String name, String defaultName, String... suffix)Get the metric fullname.static StringgetSupername(String nodePrefix, String... nameParts)Get the metric fullname with no default value.static Stringname(Class<?> klass, String... names)static Stringname(String name, String... names)
-
-
-
Method Detail
-
getDefaultName
public static String getDefaultName(Class<?> declaringClass, String method)
Get default metric name. Experience has shown that we don't need to include all of the package details for each method metric we're gathering. The class names are unique enough to be useful without this. We need to migrate to an easier format:. .
-
getSupername
public static String getSupername(String nodePrefix, String... nameParts)
Get the metric fullname with no default value.- Parameters:
nameParts- user specified name parts
-
-