Class SpringKafkaTelemetry
java.lang.Object
io.opentelemetry.instrumentation.spring.kafka.v2_7.SpringKafkaTelemetry
Entrypoint for instrumenting Spring Kafka listeners.
-
Method Summary
Modifier and TypeMethodDescriptionstatic SpringKafkaTelemetryBuilderbuilder(io.opentelemetry.api.OpenTelemetry openTelemetry) Returns a newSpringKafkaTelemetryBuilderconfigured with the givenOpenTelemetry.static SpringKafkaTelemetrycreate(io.opentelemetry.api.OpenTelemetry openTelemetry) Returns a newSpringKafkaTelemetryconfigured with the givenOpenTelemetry.<K,V> org.springframework.kafka.listener.BatchInterceptor <K, V> Returns a newBatchInterceptorthat decorates a message listener with aCONSUMERspan.<K,V> org.springframework.kafka.listener.BatchInterceptor <K, V> createBatchInterceptor(org.springframework.kafka.listener.BatchInterceptor<K, V> decoratedInterceptor) Returns a newBatchInterceptorthat decorates a message listener with aCONSUMERspan, and then delegates to a provideddecoratedInterceptor.<K,V> org.springframework.kafka.listener.RecordInterceptor <K, V> Returns a newRecordInterceptorthat decorates a message listener with aCONSUMERspan.<K,V> org.springframework.kafka.listener.RecordInterceptor <K, V> createRecordInterceptor(org.springframework.kafka.listener.RecordInterceptor<K, V> decoratedInterceptor) Returns a newRecordInterceptorthat decorates a message listener with aCONSUMERspan, and then delegates to a provideddecoratedInterceptor.
-
Method Details
-
create
Returns a newSpringKafkaTelemetryconfigured with the givenOpenTelemetry. -
builder
Returns a newSpringKafkaTelemetryBuilderconfigured with the givenOpenTelemetry. -
createRecordInterceptor
public <K,V> org.springframework.kafka.listener.RecordInterceptor<K,V> createRecordInterceptor()Returns a newRecordInterceptorthat decorates a message listener with aCONSUMERspan. Can be set on aAbstractMessageListenerContainerusing theAbstractMessageListenerContainer.setRecordInterceptor(RecordInterceptor)method. -
createRecordInterceptor
public <K,V> org.springframework.kafka.listener.RecordInterceptor<K,V> createRecordInterceptor(org.springframework.kafka.listener.RecordInterceptor<K, V> decoratedInterceptor) Returns a newRecordInterceptorthat decorates a message listener with aCONSUMERspan, and then delegates to a provideddecoratedInterceptor. Can be set on aAbstractMessageListenerContainerusing theAbstractMessageListenerContainer.setRecordInterceptor(RecordInterceptor)method. -
createBatchInterceptor
public <K,V> org.springframework.kafka.listener.BatchInterceptor<K,V> createBatchInterceptor()Returns a newBatchInterceptorthat decorates a message listener with aCONSUMERspan. Can be set on aAbstractMessageListenerContainerusing theAbstractMessageListenerContainer.setBatchInterceptor(BatchInterceptor)method. -
createBatchInterceptor
public <K,V> org.springframework.kafka.listener.BatchInterceptor<K,V> createBatchInterceptor(org.springframework.kafka.listener.BatchInterceptor<K, V> decoratedInterceptor) Returns a newBatchInterceptorthat decorates a message listener with aCONSUMERspan, and then delegates to a provideddecoratedInterceptor. Can be set on aAbstractMessageListenerContainerusing theAbstractMessageListenerContainer.setBatchInterceptor(BatchInterceptor)method.
-