Class InternalAttributeKeyImpl<T>
java.lang.Object
io.opentelemetry.api.internal.InternalAttributeKeyImpl<T>
- All Implemented Interfaces:
AttributeKey<T>
Default AttributeKey implementation which preencodes to UTF8 for OTLP export.
This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate intprivate static intbuildHashCode(AttributeType type, String key) static <T> AttributeKey<T> create(String key, AttributeType type) booleangetKey()Returns the underlying String representation of the key.byte[]Returns the key, encoded as UTF-8 bytes.getType()Returns the type of attribute for this key.inthashCode()toString()
-
Field Details
-
type
-
key
-
hashCode
private final int hashCode -
keyUtf8
-
-
Constructor Details
-
InternalAttributeKeyImpl
-
-
Method Details
-
create
-
getType
Description copied from interface:AttributeKeyReturns the type of attribute for this key. Useful for building switch statements.- Specified by:
getTypein interfaceAttributeKey<T>
-
getKey
Description copied from interface:AttributeKeyReturns the underlying String representation of the key.- Specified by:
getKeyin interfaceAttributeKey<T>
-
getKeyUtf8
public byte[] getKeyUtf8()Returns the key, encoded as UTF-8 bytes. -
equals
-
hashCode
-
toString
-
buildHashCode
private int buildHashCode() -
buildHashCode
-