Interface ExtendedAttributeKey<T>
- Type Parameters:
T- The type of value that can be set with the key.
ExtendedAttributes. The type
of value that can be set with an implementation of this key is denoted by the type parameter.
Implementations MUST be immutable, as these are used as the keys to Maps.
The allowed getType()s is a superset of those allowed in AttributeKey.
Convenience methods are provided for translating to / from AttributeKey:
asAttributeKey()converts fromExtendedAttributeKeytoAttributeKeyfromAttributeKey(AttributeKey)converts fromAttributeKeytoExtendedAttributeKey
-
Method Summary
Modifier and TypeMethodDescriptiondefault io.opentelemetry.api.common.AttributeKey<T> Deprecated.static ExtendedAttributeKey<List<Boolean>> booleanArrayKey(String key) Deprecated.Returns a new ExtendedAttributeKey for List<Boolean> valued attributes.static ExtendedAttributeKey<Boolean> booleanKey(String key) Deprecated.Returns a new ExtendedAttributeKey for Boolean valued attributes.static ExtendedAttributeKey<List<Double>> doubleArrayKey(String key) Deprecated.Returns a new ExtendedAttributeKey for List<Double> valued attributes.static ExtendedAttributeKey<Double> Deprecated.Returns a new ExtendedAttributeKey for Double valued attributes.Deprecated.UsevalueKey(String)in combination withValue.of(java.util.Map)instead.static <T> ExtendedAttributeKey<T> fromAttributeKey(io.opentelemetry.api.common.AttributeKey<T> attributeKey) Deprecated.Return an ExtendedAttributeKey equivalent to theattributeKey.getKey()Deprecated.Returns the underlying String representation of the key.getType()Deprecated.Returns the type of attribute for this key.static ExtendedAttributeKey<List<Long>> longArrayKey(String key) Deprecated.Returns a new ExtendedAttributeKey for List<Long> valued attributes.static ExtendedAttributeKey<Long> Deprecated.Returns a new ExtendedAttributeKey for Long valued attributes.static ExtendedAttributeKey<List<String>> stringArrayKey(String key) Deprecated.Returns a new ExtendedAttributeKey for List<String> valued attributes.static ExtendedAttributeKey<String> Deprecated.Returns a new ExtendedAttributeKey for String valued attributes.static ExtendedAttributeKey<io.opentelemetry.api.common.Value<?>> Deprecated.Returns a new ExtendedAttributeKey forValuevalued attributes.
-
Method Details
-
getKey
String getKey()Deprecated.Returns the underlying String representation of the key. -
getType
ExtendedAttributeType getType()Deprecated.Returns the type of attribute for this key. Useful for building switch statements. -
asAttributeKey
Deprecated. -
fromAttributeKey
static <T> ExtendedAttributeKey<T> fromAttributeKey(io.opentelemetry.api.common.AttributeKey<T> attributeKey) Deprecated.Return an ExtendedAttributeKey equivalent to theattributeKey. -
stringKey
Deprecated.Returns a new ExtendedAttributeKey for String valued attributes. -
booleanKey
Deprecated.Returns a new ExtendedAttributeKey for Boolean valued attributes. -
longKey
Deprecated.Returns a new ExtendedAttributeKey for Long valued attributes. -
doubleKey
Deprecated.Returns a new ExtendedAttributeKey for Double valued attributes. -
stringArrayKey
Deprecated.Returns a new ExtendedAttributeKey for List<String> valued attributes. -
booleanArrayKey
Deprecated.Returns a new ExtendedAttributeKey for List<Boolean> valued attributes. -
longArrayKey
Deprecated.Returns a new ExtendedAttributeKey for List<Long> valued attributes. -
doubleArrayKey
Deprecated.Returns a new ExtendedAttributeKey for List<Double> valued attributes. -
extendedAttributesKey
Deprecated.UsevalueKey(String)in combination withValue.of(java.util.Map)instead.Returns a new ExtendedAttributeKey forExtendedAttributesvalued attributes. -
valueKey
Deprecated.Returns a new ExtendedAttributeKey forValuevalued attributes.Simple attributes (
ExtendedAttributeType.STRING,ExtendedAttributeType.LONG,ExtendedAttributeType.DOUBLE,ExtendedAttributeType.BOOLEAN,ExtendedAttributeType.STRING_ARRAY,ExtendedAttributeType.LONG_ARRAY,ExtendedAttributeType.DOUBLE_ARRAY,ExtendedAttributeType.BOOLEAN_ARRAY) SHOULD be used whenever possible. Instrumentations SHOULD assume that backends do not index individual properties of complex attributes, that querying or aggregating on such properties is inefficient and complicated, and that reporting complex attributes carries higher performance overhead.
-
AttributeKeywithAttributeKey.valueKey(String)instead.