Skip to content

Commit 414b118

Browse files
committed
fix(core): Add Kafka span origins to ignored list for OpenTelemetry
Add auto.queue.spring_jakarta.kafka.producer and auto.queue.spring_jakarta.kafka.consumer to the ignored span origins when running with OTel agent or agentless-spring. Prevents duplicate spans when both Sentry and OTel Kafka instrumentation are active.
1 parent ce2ea96 commit 414b118

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sentry/src/main/java/io/sentry/util/SpanUtils.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ public final class SpanUtils {
4040
origins.add("auto.http.spring7.resttemplate");
4141
origins.add("auto.http.openfeign");
4242
origins.add("auto.http.ktor-client");
43+
origins.add("auto.queue.spring_jakarta.kafka.producer");
44+
origins.add("auto.queue.spring_jakarta.kafka.consumer");
4345
}
4446

4547
if (SentryOpenTelemetryMode.AGENT == mode) {

0 commit comments

Comments
 (0)