Search in sources :

Example 1 with SpanRefType

use of io.jaegertracing.thriftjava.SpanRefType in project jaeger-client-java by jaegertracing.

the class JaegerThriftSpanConverter method buildReferences.

static List<SpanRef> buildReferences(List<Reference> references) {
    List<SpanRef> thriftReferences = new ArrayList<SpanRef>(references.size());
    for (Reference reference : references) {
        SpanRefType thriftRefType = References.CHILD_OF.equals(reference.getType()) ? SpanRefType.CHILD_OF : SpanRefType.FOLLOWS_FROM;
        thriftReferences.add(new SpanRef(thriftRefType, reference.getSpanContext().getTraceIdLow(), reference.getSpanContext().getTraceIdHigh(), reference.getSpanContext().getSpanId()));
    }
    return thriftReferences;
}
Also used : Reference(io.jaegertracing.internal.Reference) SpanRef(io.jaegertracing.thriftjava.SpanRef) SpanRefType(io.jaegertracing.thriftjava.SpanRefType) ArrayList(java.util.ArrayList)

Aggregations

Reference (io.jaegertracing.internal.Reference)1 SpanRef (io.jaegertracing.thriftjava.SpanRef)1 SpanRefType (io.jaegertracing.thriftjava.SpanRefType)1 ArrayList (java.util.ArrayList)1