static Span span(String traceId, @Nullable String parentId, String id, @Nullable Kind kind,
    @Nullable String local, @Nullable String ip, boolean shared) {
    Span.Builder result = Span.newBuilder().traceId(traceId).parentId(parentId).id(id).kind(kind);
    if (local != null || ip != null) {
      result.localEndpoint(Endpoint.newBuilder().serviceName(local).ip(ip).build());
    }
    return result.shared(shared).build();
  }
Comparators are meant to be transitive. This exploits edge cases to fool our comparator.
zipkin/src/test/java/zipkin2/internal/TraceTest.java