Skip to content

Commit bc5d5ce

Browse files
committed
Prototype: Complex attributes (Option B)
1 parent 9868c85 commit bc5d5ce

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

api/all/src/main/java/io/opentelemetry/api/common/AttributeKey.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,16 @@ static AttributeKey<List<Long>> longArrayKey(String key) {
7070
static AttributeKey<List<Double>> doubleArrayKey(String key) {
7171
return InternalAttributeKeyImpl.create(key, AttributeType.DOUBLE_ARRAY);
7272
}
73+
74+
static AttributeKey<byte[]> byteArrayKey(String key) {
75+
return InternalAttributeKeyImpl.create(key, AttributeType.BYTE_ARRAY);
76+
}
77+
78+
static AttributeKey<List<Value<?>>> valueArrayKey(String key) {
79+
return InternalAttributeKeyImpl.create(key, AttributeType.VALUE_ARRAY);
80+
}
81+
82+
static AttributeKey<List<KeyValue>> valueMapKey(String key) {
83+
return InternalAttributeKeyImpl.create(key, AttributeType.VALUE_MAP);
84+
}
7385
}

api/all/src/main/java/io/opentelemetry/api/common/AttributeType.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,8 @@ public enum AttributeType {
1717
STRING_ARRAY,
1818
BOOLEAN_ARRAY,
1919
LONG_ARRAY,
20-
DOUBLE_ARRAY
20+
DOUBLE_ARRAY,
21+
BYTE_ARRAY,
22+
VALUE_ARRAY,
23+
VALUE_MAP
2124
}

0 commit comments

Comments
 (0)