From bc5d5cece13162ed7fd25a2952537091b18e17b2 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Tue, 16 Sep 2025 12:06:25 -0700 Subject: [PATCH] Prototype: Complex attributes (Option B) --- .../io/opentelemetry/api/common/AttributeKey.java | 12 ++++++++++++ .../io/opentelemetry/api/common/AttributeType.java | 5 ++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/api/all/src/main/java/io/opentelemetry/api/common/AttributeKey.java b/api/all/src/main/java/io/opentelemetry/api/common/AttributeKey.java index 7d012aa14ca..4ab9b25ccf5 100644 --- a/api/all/src/main/java/io/opentelemetry/api/common/AttributeKey.java +++ b/api/all/src/main/java/io/opentelemetry/api/common/AttributeKey.java @@ -70,4 +70,16 @@ static AttributeKey> longArrayKey(String key) { static AttributeKey> doubleArrayKey(String key) { return InternalAttributeKeyImpl.create(key, AttributeType.DOUBLE_ARRAY); } + + static AttributeKey byteArrayKey(String key) { + return InternalAttributeKeyImpl.create(key, AttributeType.BYTE_ARRAY); + } + + static AttributeKey>> valueArrayKey(String key) { + return InternalAttributeKeyImpl.create(key, AttributeType.VALUE_ARRAY); + } + + static AttributeKey> valueMapKey(String key) { + return InternalAttributeKeyImpl.create(key, AttributeType.VALUE_MAP); + } } diff --git a/api/all/src/main/java/io/opentelemetry/api/common/AttributeType.java b/api/all/src/main/java/io/opentelemetry/api/common/AttributeType.java index 1c51e36d644..57dc0e73548 100644 --- a/api/all/src/main/java/io/opentelemetry/api/common/AttributeType.java +++ b/api/all/src/main/java/io/opentelemetry/api/common/AttributeType.java @@ -17,5 +17,8 @@ public enum AttributeType { STRING_ARRAY, BOOLEAN_ARRAY, LONG_ARRAY, - DOUBLE_ARRAY + DOUBLE_ARRAY, + BYTE_ARRAY, + VALUE_ARRAY, + VALUE_MAP }