Package io.micrometer.common.docs
Interface KeyName
public interface KeyName
Represents a key name used for documenting instrumentation.
- Since:
- 1.10.0
-
Method Summary
Modifier and TypeMethodDescriptionasString()
Returns key name.default boolean
Whether this key is required to be present in the instrumentation.static KeyName[]
Merges arrays of tag keys.default KeyValue
Creates a key value for the given key name.default KeyValue
Creates a key value for the given key name.
-
Method Details
-
merge
Merges arrays of tag keys.- Parameters:
keyNames
- arrays of tag keys- Returns:
- a merged array of tag keys
-
withValue
Creates a key value for the given key name.- Parameters:
value
- value for key- Returns:
- key value
-
withValue
Creates a key value for the given key name.- Parameters:
value
- value for keyvalidator
- value validator- Returns:
- key value
-
asString
String asString()Returns key name.- Returns:
- key name
-
isRequired
default boolean isRequired()Whether this key is required to be present in the instrumentation. This can be checked in a test of the instrumentation.- Returns:
- whether this key is required
-