Updates to latest zipkin and brave, removing Scribe dependency

Recent versions of zipkin and brave operate with http instead of scribe.
This changes the implementation accordingly, as well adds a sampler to
the POST endpoint.

A notable impact is that we no longer require a collector process, as
the zipkin server's POST endpoint is a collector.
This commit is contained in:
Adrian Cole
2016-01-12 13:13:46 +08:00
parent bcfe84674b
commit 84d2706a57
25 changed files with 206 additions and 124 deletions

View File

@@ -47,7 +47,7 @@ public class SampleZipkinApplication {
SpringApplication.run(SampleZipkinApplication.class, args);
}
// Use this for debugging (or if there is no Zipkin collector running on port 9410)
// Use this for debugging (or if there is no Zipkin server running on port 9411)
@Bean
@ConditionalOnProperty(value="sample.zipkin.enabled", havingValue="false")
public SpanCollector spanCollector() {

View File

@@ -55,16 +55,12 @@ public class ZipkinDockerTests extends AbstractIntegrationTest {
public static DockerComposeContainer environment =
new DockerComposeContainer(new File("src/test/resources/docker-compose.yml"))
.withExposedService("rabbitmq_1", 5672)
.withExposedService("collector_1", 9410)
.withExposedService("collector_1", 9900)
.withExposedService("mysql_1", 3306)
.withExposedService("query_1", 9411)
.withExposedService("query_1", 9901);
.withExposedService("query_1", 9411);
@Before
public void setup() {
await().until(zipkinQueryServerIsUp());
await().until(zipkinCollectorServerIsUp());
}
@Test
@@ -96,7 +92,6 @@ public class ZipkinDockerTests extends AbstractIntegrationTest {
private List<String> serviceNamesNotFoundInZipkin(List<io.zipkin.Span> spans) {
List<String> serviceNamesFoundInAnnotations = spans.stream()
.filter(span -> span.annotations != null)
.map(span -> span.annotations)
.flatMap(Collection::stream)
.filter(span -> span.endpoint != null)
@@ -105,7 +100,6 @@ public class ZipkinDockerTests extends AbstractIntegrationTest {
.distinct()
.collect(Collectors.toList());
List<String> serviceNamesFoundInBinaryAnnotations = spans.stream()
.filter(span -> span.binaryAnnotations != null)
.map(span -> span.binaryAnnotations)
.flatMap(Collection::stream)
.filter(span -> span.endpoint != null)
@@ -122,7 +116,6 @@ public class ZipkinDockerTests extends AbstractIntegrationTest {
private List<String> annotationsNotFoundInZipkin(List<io.zipkin.Span> spans) {
String binaryAnnotationName = "random-sleep-millis";
Optional<String> names = spans.stream()
.filter(span -> span.binaryAnnotations != null)
.map(span -> span.binaryAnnotations)
.flatMap(Collection::stream)
.filter(span -> span.endpoint != null)

View File

@@ -1,16 +1,5 @@
collector:
image: openzipkin/zipkin-collector:1.25.0
environment:
- TRANSPORT_TYPE=scribe
- STORAGE_TYPE=mysql
ports:
- 9410:9410
- 9900:9900
links:
- mysql:storage
query:
image: openzipkin/zipkin-query:1.25.0
image: openzipkin/zipkin-query:1.30.0
environment:
# Remove TRANSPORT_TYPE to disable tracing
- TRANSPORT_TYPE=http
@@ -28,6 +17,6 @@ rabbitmq:
- 15672
mysql:
image: openzipkin/zipkin-mysql:1.25.0
image: openzipkin/zipkin-mysql:1.30.0
ports:
- 3306:3306
- 3306:3306