Package zipkin2.collector.kafka
Class KafkaCollector.Builder
java.lang.Object
zipkin2.collector.CollectorComponent.Builder
zipkin2.collector.kafka.KafkaCollector.Builder
- Enclosing class:
- KafkaCollector
Configuration including defaults needed to consume spans from a Kafka topic.
-
Method Summary
Modifier and TypeMethodDescriptionbootstrapServers(String bootstrapServers) The bootstrapServers connect string, ex.build()The consumer group this process is consuming on behalf of.metrics(CollectorMetrics metrics) final KafkaCollector.BuilderBy default, a consumer will be built from properties derived from builder defaults, as well as "auto.offset.reset" -> "earliest".sampler(CollectorSampler sampler) storage(StorageComponent storage) streams(int streams) Count of threads consuming the topic.Topic zipkin spans will be consumed from.
-
Method Details
-
storage
- Specified by:
storagein classCollectorComponent.Builder
-
sampler
- Specified by:
samplerin classCollectorComponent.Builder
-
metrics
- Specified by:
metricsin 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:
buildin classCollectorComponent.Builder
-