use of zipkin.internal.DependencyLinkSpan in project zipkin by openzipkin.
the class DependencyLinkSpanIterator method next.
@Override
public DependencyLinkSpan next() {
Record row = delegate.next();
DependencyLinkSpan.Builder result = DependencyLinkSpan.builder(traceIdHi != null ? traceIdHi : 0L, traceIdLo, row.getValue(ZipkinSpans.ZIPKIN_SPANS.PARENT_ID), row.getValue(ZipkinSpans.ZIPKIN_SPANS.ID));
parseClientAndServerNames(result, row.getValue(ZIPKIN_ANNOTATIONS.A_KEY), row.getValue(ZIPKIN_ANNOTATIONS.ENDPOINT_SERVICE_NAME));
while (hasNext()) {
Record next = delegate.peek();
if (next == null) {
continue;
}
if (row.getValue(ZipkinSpans.ZIPKIN_SPANS.ID).equals(next.getValue(ZipkinSpans.ZIPKIN_SPANS.ID))) {
// advance the iterator since we are in the same span id
delegate.next();
parseClientAndServerNames(result, next.getValue(ZIPKIN_ANNOTATIONS.A_KEY), next.getValue(ZIPKIN_ANNOTATIONS.ENDPOINT_SERVICE_NAME));
} else {
break;
}
}
return result.build();
}
Aggregations