Removes Zipkin dependency from all tests (#1645)
Brave's SpanHandler can report natively in other formats which have different constraints than Zipkin and often extensions to the data model. This change ports all tests away from Zipkin's types so that it is more clear what's actually recorded vs what's a side-effect of Zipkin conversion. This removes `BlockingQueueSpanReporter` which was never released, also.
This commit is contained in:
@@ -16,10 +16,11 @@
|
||||
|
||||
package sample;
|
||||
|
||||
import brave.handler.MutableSpan;
|
||||
import brave.handler.SpanHandler;
|
||||
import brave.propagation.TraceContext;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import zipkin2.Span;
|
||||
import zipkin2.reporter.Reporter;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
@@ -43,11 +44,12 @@ public class SampleFeignApplication {
|
||||
// Use this for debugging (or if there is no Zipkin server running on port 9411)
|
||||
@Bean
|
||||
@ConditionalOnProperty(value = "sample.zipkin.enabled", havingValue = "false")
|
||||
public Reporter<Span> spanReporter() {
|
||||
return new Reporter<Span>() {
|
||||
public SpanHandler spanHandler() {
|
||||
return new SpanHandler() {
|
||||
@Override
|
||||
public void report(Span span) {
|
||||
public boolean end(TraceContext context, MutableSpan span, Cause cause) {
|
||||
logger.info(span);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user