public class StandardKafkaSpanDecorator extends Object implements KafkaSpanDecorator
| Modifier and Type | Field and Description |
|---|---|
static String |
COMPONENT_KAFKA_CONSUMER |
static String |
COMPONENT_KAFKA_PRODUCER |
| Constructor and Description |
|---|
StandardKafkaSpanDecorator() |
| Modifier and Type | Method and Description |
|---|---|
<K,V> void |
onReceive(org.apache.kafka.clients.consumer.ConsumerRecord<K,V> record,
io.opentracing.Span span)
This API will be called to decorate the newly created span by the consumer.
|
void |
onSend(org.apache.kafka.clients.producer.ProducerRecord<Object,Object> record,
io.opentracing.Span span)
This API will be called to decorate the newly created span.
|
public static final String COMPONENT_KAFKA_PRODUCER
public static final String COMPONENT_KAFKA_CONSUMER
public void onSend(org.apache.kafka.clients.producer.ProducerRecord<Object,Object> record, io.opentracing.Span span)
KafkaSpanDecoratoronSend in interface KafkaSpanDecoratorrecord - The record being sentspan - The current span created by the producer interceptorpublic <K,V> void onReceive(org.apache.kafka.clients.consumer.ConsumerRecord<K,V> record,
io.opentracing.Span span)
KafkaSpanDecoratoronReceive in interface KafkaSpanDecoratorrecord - The record received from the brokerspan - The span created by the consumer interceptorCopyright © 2020. All rights reserved.