Skip to content

Commit b3d0efc

Browse files
committed
fix ci && test
1 parent a761578 commit b3d0efc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

smoke-tests-otel-starter/spring-boot-common/src/main/java/io/opentelemetry/spring/smoketest/AbstractKafkaSpringStarterSmokeTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ abstract class AbstractKafkaSpringStarterSmokeTest extends AbstractSpringStarter
3131
private static final AttributeKey<String> MESSAGING_CLIENT_ID =
3232
AttributeKey.stringKey("messaging.client_id");
3333

34+
protected static final AttributeKey<String> MESSAGING_KAFKA_BOOTSTRAP_SERVERS =
35+
AttributeKey.stringKey("messaging.kafka.bootstrap.servers");
36+
3437
@SuppressWarnings("deprecation") // using deprecated semconv
3538
@Test
3639
void shouldInstrumentProducerAndConsumer() {
@@ -65,6 +68,7 @@ void shouldInstrumentProducerAndConsumer() {
6568
MessagingIncubatingAttributes.MESSAGING_DESTINATION_NAME,
6669
"testTopic"),
6770
equalTo(MessagingIncubatingAttributes.MESSAGING_OPERATION, "publish"),
71+
satisfies(MESSAGING_KAFKA_BOOTSTRAP_SERVERS, AbstractStringAssert::isNotEmpty),
6872
satisfies(
6973
MESSAGING_CLIENT_ID,
7074
stringAssert -> stringAssert.startsWith("producer")),
@@ -86,6 +90,7 @@ void shouldInstrumentProducerAndConsumer() {
8690
MessagingIncubatingAttributes.MESSAGING_DESTINATION_NAME,
8791
"testTopic"),
8892
equalTo(MessagingIncubatingAttributes.MESSAGING_OPERATION, "process"),
93+
satisfies(MESSAGING_KAFKA_BOOTSTRAP_SERVERS, AbstractStringAssert::isNotEmpty),
8994
satisfies(
9095
MessagingIncubatingAttributes.MESSAGING_MESSAGE_BODY_SIZE,
9196
AbstractLongAssert::isNotNegative),

0 commit comments

Comments
 (0)