Class ProducerTracer<S>
- java.lang.Object
-
- io.vertx.kafka.client.common.tracing.ProducerTracer<S>
-
public class ProducerTracer<S> extends Object
Tracer for Kafka producer, wrapping the generic tracer.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classProducerTracer.StartedSpan
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <S> ProducerTracercreate(VertxTracer tracer, KafkaClientOptions opts)Creates a ProducerTracer, which provides an opinionated facade for usingVertxTracerwith a Kafka Producer use case.ProducerTracer.StartedSpanprepareSendMessage(Context context, org.apache.kafka.clients.producer.ProducerRecord record)
-
-
-
Method Detail
-
create
public static <S> ProducerTracer create(VertxTracer tracer, KafkaClientOptions opts)
Creates a ProducerTracer, which provides an opinionated facade for usingVertxTracerwith a Kafka Producer use case. The method will returnnullif Tracing is not setup in Vert.x, or ifTracingPolicy.IGNOREis used.- Type Parameters:
S- the type of spans that is going to be generated, depending on the tracing system (zipkin, opentracing ...)- Parameters:
tracer- the generic tracer objectopts- Kafka client options- Returns:
- a new instance of
ProducerTracer, ornull
-
prepareSendMessage
public ProducerTracer.StartedSpan prepareSendMessage(Context context, org.apache.kafka.clients.producer.ProducerRecord record)
-
-