K - key typepublic abstract class BaseTracingProducerInterceptor<K> extends Object implements org.apache.kafka.clients.producer.ProducerInterceptor<K,byte[]>
ProducerRecord before it is sent.
Injection is left abstract to allow implementations for different strategies.
Required: A Tracer in config as "brave.tracer".
Optional: A SpanNameProvider in config as "brave.span.name.provider" to customize span name.
Optional: A Endpoint in config as "brave.span.remote.endpoint" to customize span remote endpoint.| Constructor and Description |
|---|
BaseTracingProducerInterceptor() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
configure(Map<String,?> configs) |
protected abstract org.apache.kafka.clients.producer.ProducerRecord<K,byte[]> |
getTracedProducerRecord(brave.propagation.TraceContext traceContext,
org.apache.kafka.clients.producer.ProducerRecord<K,byte[]> originalRecord) |
void |
onAcknowledgement(org.apache.kafka.clients.producer.RecordMetadata metadata,
Exception exception) |
org.apache.kafka.clients.producer.ProducerRecord<K,byte[]> |
onSend(org.apache.kafka.clients.producer.ProducerRecord<K,byte[]> record) |
protected abstract org.apache.kafka.clients.producer.ProducerRecord<K,byte[]> getTracedProducerRecord(brave.propagation.TraceContext traceContext, org.apache.kafka.clients.producer.ProducerRecord<K,byte[]> originalRecord)
public org.apache.kafka.clients.producer.ProducerRecord<K,byte[]> onSend(org.apache.kafka.clients.producer.ProducerRecord<K,byte[]> record)
onSend in interface org.apache.kafka.clients.producer.ProducerInterceptor<K,byte[]>public void onAcknowledgement(org.apache.kafka.clients.producer.RecordMetadata metadata,
Exception exception)
onAcknowledgement in interface org.apache.kafka.clients.producer.ProducerInterceptor<K,byte[]>public void close()
close in interface org.apache.kafka.clients.producer.ProducerInterceptor<K,byte[]>Copyright © 2016–2017 SmartThingsOSS. All rights reserved.