Skip to content

Commit 4c982d3

Browse files
committed
Remove messaging header normalization
1 parent fab320d commit 4c982d3

File tree

1 file changed

+12
-4
lines changed
  • instrumentation/kafka/kafka-clients/kafka-clients-2.6/library/src/test/java/io/opentelemetry/instrumentation/kafkaclients/v2_6

1 file changed

+12
-4
lines changed

instrumentation/kafka/kafka-clients/kafka-clients-2.6/library/src/test/java/io/opentelemetry/instrumentation/kafkaclients/v2_6/WrapperTest.java

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,18 @@ protected static List<AttributeAssertion> sendAttributes(boolean testHeaders) {
9595
satisfies(MESSAGING_DESTINATION_PARTITION_ID, AbstractStringAssert::isNotEmpty),
9696
satisfies(MESSAGING_KAFKA_MESSAGE_OFFSET, AbstractLongAssert::isNotNegative)));
9797
if (testHeaders) {
98-
assertions.add(
99-
equalTo(
100-
AttributeKey.stringArrayKey("messaging.header.Test-Message-Header"),
101-
Collections.singletonList("test")));
98+
if (SemconvStability.isEmitOldMessageSemconv()) {
99+
assertions.add(
100+
equalTo(
101+
AttributeKey.stringArrayKey("messaging.header.Test_Message_Header"),
102+
Collections.singletonList("test")));
103+
}
104+
if (SemconvStability.isEmitStableMessageSemconv()) {
105+
assertions.add(
106+
equalTo(
107+
AttributeKey.stringArrayKey("messaging.header.Test-Message-Header"),
108+
Collections.singletonList("test")));
109+
}
102110
}
103111
return assertions;
104112
}

0 commit comments

Comments
 (0)