Interface KeyName


public interface KeyName
Represents a key name used for documenting instrumentation.
Since:
1.10.0
  • Method Details

    • merge

      static KeyName[] merge(KeyName[]... keyNames)
      Merges arrays of tag keys.
      Parameters:
      keyNames - arrays of tag keys
      Returns:
      a merged array of tag keys
    • withValue

      default KeyValue withValue(String value)
      Creates a key value for the given key name.
      Parameters:
      value - value for key
      Returns:
      key value
    • withNoneValue

      default KeyValue withNoneValue()
      Creates a key value for the given key name with "none".
      Returns:
      key value
      Since:
      1.16.0
    • withValue

      default KeyValue withValue(String value, Predicate<Object> validator)
      Creates a key value for the given key name.
      Parameters:
      value - value for key
      validator - 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