Merge pull request #109 from spring-cloud/shinies

Makes it possible to supply an https zipkin endpoint
This commit is contained in:
Adrian Cole
2016-01-18 08:59:07 +08:00
4 changed files with 5 additions and 7 deletions

View File

@@ -35,7 +35,7 @@ public class IntegrationTestZipkinSpanReporter implements ZipkinSpanReporter {
@Override
public void report(Span span) {
log.info(span);
log.debug(span);
hashedSpans.add(span);
}

View File

@@ -91,8 +91,7 @@ public class ZipkinTests extends AbstractIntegrationTest {
}
private ZipkinSpanReporter getSpanCollector(ZipkinProperties zipkin) {
String url = "http://localhost:" + zipkin.getPort();
return new HttpZipkinSpanReporter(url, zipkin.getFlushInterval());
return new HttpZipkinSpanReporter(zipkin.getBaseUrl(), zipkin.getFlushInterval());
}
}
}

View File

@@ -41,8 +41,7 @@ public class ZipkinAutoConfiguration {
@ConditionalOnMissingBean(ZipkinSpanReporter.class)
public ZipkinSpanReporter reporter() {
ZipkinProperties zipkin = zipkinProperties();
String url = "http://" + zipkin.getHost() + ":" + zipkin.getPort();
return new HttpZipkinSpanReporter(url, zipkin.getFlushInterval());
return new HttpZipkinSpanReporter(zipkin.getBaseUrl(), zipkin.getFlushInterval());
}
@Bean

View File

@@ -28,8 +28,8 @@ import lombok.Data;
public class ZipkinProperties {
// Sample rate = 1.0 means 100% of requests will get traced.
private float fixedSampleRate = 1.0f;
private String host = "localhost";
private int port = 9411;
/** URL of the zipkin query server instance. */
private String baseUrl = "http://localhost:9411/";
private boolean enabled = true;
private int flushInterval = 1;
}