Add exportable to Span and use it to determine if data are exported

If the flag is set then annotations are collected and the data are exported
in zipkin or stream. If not you still get the correlation ids, so a purely
log-oriented solution will always have useful data on all requests.
This commit is contained in:
Dave Syer
2015-12-17 16:35:06 +00:00
parent b48f00f677
commit c11e530560
20 changed files with 237 additions and 203 deletions

View File

@@ -95,7 +95,9 @@ public class StreamSpanListener {
@Order(0)
public void release(SpanReleasedEvent event) {
event.getSpan().addTimelineAnnotation("release");
this.queue.add(event.getSpan());
if (event.getSpan().isExportable()) {
this.queue.add(event.getSpan());
}
}
@InboundChannelAdapter(value = SleuthSource.OUTPUT)