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 Summary
Modifier and Type Method Description KafkaCollector.Builder
bootstrapServers(String bootstrapServers)
The bootstrapServers connect string, ex.KafkaCollector
build()
KafkaCollector.Builder
groupId(String groupId)
The consumer group this process is consuming on behalf of.KafkaCollector.Builder
metrics(CollectorMetrics metrics)
KafkaCollector.Builder
overrides(Map<String,?> overrides)
By default, a consumer will be built from properties derived from builder defaults, as well as "auto.offset.reset" -> "earliest".KafkaCollector.Builder
sampler(CollectorSampler sampler)
KafkaCollector.Builder
storage(StorageComponent storage)
KafkaCollector.Builder
streams(int streams)
Count of threads consuming the topic.KafkaCollector.Builder
topic(String topic)
Topic zipkin spans will be consumed from.
-
Method Details
-
storage
- Specified by:
storage
in classCollectorComponent.Builder
-
sampler
- Specified by:
sampler
in classCollectorComponent.Builder
-
metrics
- Specified by:
metrics
in classCollectorComponent.Builder
-
topic
Topic zipkin spans will be consumed from. Defaults to "zipkin". Multiple topics may be specified if comma delimited. -
bootstrapServers
The bootstrapServers connect string, ex. 127.0.0.1:9092. No default. -
groupId
The consumer group this process is consuming on behalf of. Defaults to "zipkin" -
streams
Count of threads consuming the topic. Defaults to 1 -
overrides
By 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:
build
in classCollectorComponent.Builder
-