Fixed the kafka sender condition. fixes gh-985
This commit is contained in:
@@ -887,9 +887,6 @@ The following example shows setting the sender type for `web`:
|
||||
spring.zipkin.sender.type: web
|
||||
----
|
||||
|
||||
IMPORTANT: If you have Kafka on the classpath, you need to set
|
||||
`spring.zipkin.kafka.enabled` to `true` apart from setting the sender type.
|
||||
|
||||
To customize the `RestTemplate` that sends spans to Zipkin via HTTP, you can register
|
||||
the `ZipkinRestTemplateCustomizer` bean.
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ import zipkin2.reporter.kafka11.KafkaSender;
|
||||
@ConditionalOnBean(KafkaProperties.class)
|
||||
@ConditionalOnMissingBean(Sender.class)
|
||||
@Conditional(ZipkinSenderCondition.class)
|
||||
@ConditionalOnProperty(value = "spring.zipkin.kafka.enabled", havingValue = "true")
|
||||
@ConditionalOnProperty(value = "spring.zipkin.sender.type", havingValue = "kafka")
|
||||
class ZipkinKafkaSenderConfiguration {
|
||||
@Value("${spring.zipkin.kafka.topic:zipkin}")
|
||||
private String topic;
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
{"properties": [
|
||||
{
|
||||
"name": "spring.zipkin.kafka.enabled",
|
||||
"type": "java.lang.Boolean",
|
||||
"description": "Should Kafka Zipkin sender be enabled. With Kafka on the classpath you have to set this value to true to send spans to Zipkin via Kafka.",
|
||||
"defaultValue": false
|
||||
}
|
||||
]}
|
||||
@@ -125,7 +125,7 @@ public class ZipkinAutoConfigurationTests {
|
||||
public void overrideKafkaTopic() throws Exception {
|
||||
context = new AnnotationConfigApplicationContext();
|
||||
addEnvironment(context, "spring.zipkin.kafka.topic:zipkin2",
|
||||
"spring.zipkin.kafka.enabled:true");
|
||||
"spring.zipkin.sender.type:kafka");
|
||||
context.register(
|
||||
PropertyPlaceholderAutoConfiguration.class,
|
||||
KafkaAutoConfiguration.class,
|
||||
|
||||
Reference in New Issue
Block a user