Skip to content

Commit f91ab1f

Browse files
committed
Remove potentially confusing String key override for Value<?>
1 parent 4ee9076 commit f91ab1f

File tree

2 files changed

+1
-16
lines changed

2 files changed

+1
-16
lines changed

api/incubator/src/main/java/io/opentelemetry/api/incubator/common/ExtendedAttributesBuilder.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -102,18 +102,6 @@ default <T> ExtendedAttributesBuilder put(String key, ExtendedAttributes value)
102102
return put(ExtendedAttributeKey.extendedAttributesKey(key), value);
103103
}
104104

105-
/**
106-
* Puts a {@link Value} attribute into this.
107-
*
108-
* <p>Note: It is strongly recommended to use {@link #put(ExtendedAttributeKey, Object)}, and
109-
* pre-allocate your keys, if possible.
110-
*
111-
* @return this Builder
112-
*/
113-
default ExtendedAttributesBuilder put(String key, Value<?> value) {
114-
return put(valueKey(key), value);
115-
}
116-
117105
/**
118106
* Puts a String array attribute into this.
119107
*

api/incubator/src/test/java/io/opentelemetry/api/incubator/common/ExtendedAttributesTest.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -217,9 +217,6 @@ private static Stream<Arguments> attributesArgs() {
217217
ImmutableMap.builder()
218218
.put("key", ImmutableMap.builder().put("child", "value").build())
219219
.build()),
220-
Arguments.of(
221-
ExtendedAttributes.builder().put("key", Value.of("value")).build(),
222-
ImmutableMap.builder().put("key", Value.of("value")).build()),
223220
Arguments.of(
224221
ExtendedAttributes.builder()
225222
.put(ExtendedAttributeKey.stringKey("key"), "value")
@@ -281,7 +278,7 @@ private static Stream<Arguments> attributesArgs() {
281278
.put("key8", 1L, 2L)
282279
.put("key9", 1.1, 2.2)
283280
.put("key10", ExtendedAttributes.builder().put("child", "value").build())
284-
.put("key11", Value.of("value"))
281+
.put(ExtendedAttributeKey.valueKey("key11"), Value.of("value"))
285282
.build(),
286283
ImmutableMap.builder()
287284
.put("key1", "value1")

0 commit comments

Comments
 (0)