Skip to content

Commit eca37c7

Browse files
committed
Move getMessageBodySize and getMessageEnvelopeSize back to onStart
1 parent 851d668 commit eca37c7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

instrumentation-api-incubator/src/test/java/io/opentelemetry/instrumentation/api/incubator/semconv/messaging/MessagingAttributesExtractorTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ void shouldExtractAllAvailableAttributes(
104104

105105
expectedEntries.add(
106106
entry(MessagingIncubatingAttributes.MESSAGING_MESSAGE_CONVERSATION_ID, "42"));
107+
expectedEntries.add(entry(MessagingIncubatingAttributes.MESSAGING_MESSAGE_BODY_SIZE, 100L));
108+
expectedEntries.add(entry(MessagingIncubatingAttributes.MESSAGING_MESSAGE_ENVELOPE_SIZE, 120L));
107109

108110
@SuppressWarnings({"unchecked", "rawtypes"})
109111
MapEntry<? extends AttributeKey<?>, ?>[] expectedEntriesArr =
@@ -113,9 +115,7 @@ void shouldExtractAllAvailableAttributes(
113115
assertThat(endAttributes.build())
114116
.containsOnly(
115117
entry(MessagingIncubatingAttributes.MESSAGING_MESSAGE_ID, "42"),
116-
entry(MessagingIncubatingAttributes.MESSAGING_BATCH_MESSAGE_COUNT, 2L),
117-
entry(MessagingIncubatingAttributes.MESSAGING_MESSAGE_BODY_SIZE, 100L),
118-
entry(MessagingIncubatingAttributes.MESSAGING_MESSAGE_ENVELOPE_SIZE, 120L));
118+
entry(MessagingIncubatingAttributes.MESSAGING_BATCH_MESSAGE_COUNT, 2L));
119119
}
120120

121121
static Stream<Arguments> destinations() {

0 commit comments

Comments
 (0)