Skip to content

Commit 6186aca

Browse files
authored
Merge pull request #5319 from getsentry/fix/queue-instrumentation-kafka-context-handoff
fix(spring-jakarta): [Queue Instrumentation 23] Install Kafka context before trace setup
2 parents 09a6512 + 19cb740 commit 6186aca

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

sentry-spring-jakarta/src/main/java/io/sentry/spring/jakarta/kafka/SentryKafkaRecordInterceptor.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ public SentryKafkaRecordInterceptor(
6161

6262
final @NotNull IScopes forkedScopes = scopes.forkedRootScopes("SentryKafkaRecordInterceptor");
6363
final @NotNull ISentryLifecycleToken lifecycleToken = forkedScopes.makeCurrent();
64+
currentContext.set(new SentryRecordContext(lifecycleToken, null));
6465

6566
final @Nullable TransactionContext transactionContext = continueTrace(forkedScopes, record);
6667

0 commit comments

Comments
 (0)