@Override public boolean equals(Object o) {
      if (o == this) return true;
      if (!(o instanceof SharedKey)) return false;
      SharedKey that = (SharedKey) o;
      return id.equals(that.id) && Objects.equals(endpoint, that.endpoint);
    }
A span in the tree is not always unique on ID. Sharing is allowed once per ID (Ex: in RPC).
However, it is possible in a retry scenario for accidental duplicate ID sharing to occur
zipkin/src/main/java/zipkin2/internal/SpanNode.java