Package io.sentry.spring7.kafka
Class SentryKafkaRecordInterceptor<K,V>
java.lang.Object
io.sentry.spring7.kafka.SentryKafkaRecordInterceptor<K,V>
- All Implemented Interfaces:
org.springframework.kafka.listener.RecordInterceptor<K,,V> org.springframework.kafka.listener.ThreadStateProcessor
@Internal
public final class SentryKafkaRecordInterceptor<K,V>
extends Object
implements org.springframework.kafka.listener.RecordInterceptor<K,V>
A
RecordInterceptor that creates queue.process transactions for incoming Kafka
records with distributed tracing support.-
Constructor Summary
ConstructorsConstructorDescriptionSentryKafkaRecordInterceptor(@NotNull io.sentry.IScopes scopes) SentryKafkaRecordInterceptor(@NotNull io.sentry.IScopes scopes, @Nullable org.springframework.kafka.listener.RecordInterceptor<K, V> delegate) -
Method Summary
Modifier and TypeMethodDescriptionvoidafterRecord(@NotNull org.apache.kafka.clients.consumer.ConsumerRecord<K, V> record, @NotNull org.apache.kafka.clients.consumer.Consumer<K, V> consumer) voidclearThreadState(@NotNull org.apache.kafka.clients.consumer.Consumer<?, ?> consumer) voidfailure(@NotNull org.apache.kafka.clients.consumer.ConsumerRecord<K, V> record, @NotNull Exception exception, @NotNull org.apache.kafka.clients.consumer.Consumer<K, V> consumer) intercept(@NotNull org.apache.kafka.clients.consumer.ConsumerRecord<K, V> record, @NotNull org.apache.kafka.clients.consumer.Consumer<K, V> consumer) voidsetupThreadState(@NotNull org.apache.kafka.clients.consumer.Consumer<?, ?> consumer) voidsuccess(@NotNull org.apache.kafka.clients.consumer.ConsumerRecord<K, V> record, @NotNull org.apache.kafka.clients.consumer.Consumer<K, V> consumer)
-
Constructor Details
-
SentryKafkaRecordInterceptor
public SentryKafkaRecordInterceptor(@NotNull @NotNull io.sentry.IScopes scopes) -
SentryKafkaRecordInterceptor
-
-
Method Details
-
intercept
-
success
-
failure
-
afterRecord
-
setupThreadState
public void setupThreadState(@NotNull @NotNull org.apache.kafka.clients.consumer.Consumer<?, ?> consumer) - Specified by:
setupThreadStatein interfaceorg.springframework.kafka.listener.ThreadStateProcessor
-
clearThreadState
public void clearThreadState(@NotNull @NotNull org.apache.kafka.clients.consumer.Consumer<?, ?> consumer) - Specified by:
clearThreadStatein interfaceorg.springframework.kafka.listener.ThreadStateProcessor
-