Package zipkin2.collector.kafka
Class KafkaCollector.Builder
java.lang.Object
zipkin2.collector.CollectorComponent.Builder
zipkin2.collector.kafka.KafkaCollector.Builder
- Enclosing class:
- KafkaCollector
public static final class KafkaCollector.Builder extends CollectorComponent.Builder
Configuration including defaults needed to consume spans from a Kafka topic.
- 
Method SummaryModifier and Type Method Description KafkaCollector.BuilderbootstrapServers(String bootstrapServers)The bootstrapServers connect string, ex.KafkaCollectorbuild()KafkaCollector.BuildergroupId(String groupId)The consumer group this process is consuming on behalf of.KafkaCollector.Buildermetrics(CollectorMetrics metrics)KafkaCollector.Builderoverrides(Map<String,?> overrides)By default, a consumer will be built from properties derived from builder defaults, as well as "auto.offset.reset" -> "earliest".KafkaCollector.Buildersampler(CollectorSampler sampler)KafkaCollector.Builderstorage(StorageComponent storage)KafkaCollector.Builderstreams(int streams)Count of threads consuming the topic.KafkaCollector.Buildertopic(String topic)Topic zipkin spans will be consumed from.
- 
Method Details- 
storage- Specified by:
- storagein class- CollectorComponent.Builder
 
- 
sampler- Specified by:
- samplerin class- CollectorComponent.Builder
 
- 
metrics- Specified by:
- metricsin class- CollectorComponent.Builder
 
- 
topicTopic zipkin spans will be consumed from. Defaults to "zipkin". Multiple topics may be specified if comma delimited.
- 
bootstrapServersThe bootstrapServers connect string, ex. 127.0.0.1:9092. No default.
- 
groupIdThe consumer group this process is consuming on behalf of. Defaults to "zipkin"
- 
streamsCount of threads consuming the topic. Defaults to 1
- 
overridesBy default, a consumer will be built from properties derived from builder defaults, as well as "auto.offset.reset" -> "earliest". Any properties set here will override the consumer config.For example: Only consume spans since you connected by setting the below. Map<String, String> overrides = new LinkedHashMap<>(); overrides.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "latest"); builder.overrides(overrides);- See Also:
- ConsumerConfig
 
- 
build- Specified by:
- buildin class- CollectorComponent.Builder
 
 
-