Search in sources :

Example 1 with Reference

use of com.uber.jaeger.Reference 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().getTraceId(), 0, reference.getSpanContext().getSpanId()));
    }
    return thriftReferences;
}
Also used : Reference(com.uber.jaeger.Reference) SpanRef(com.uber.jaeger.thriftjava.SpanRef) SpanRefType(com.uber.jaeger.thriftjava.SpanRefType) ArrayList(java.util.ArrayList)

Aggregations

Reference (com.uber.jaeger.Reference)1 SpanRef (com.uber.jaeger.thriftjava.SpanRef)1 SpanRefType (com.uber.jaeger.thriftjava.SpanRefType)1 ArrayList (java.util.ArrayList)1