boolean tryMerge(Endpoint endpoint) {
      if (endpoint == null) return true;
      if (serviceName != null &&
        endpoint.serviceName() != null && !serviceName.equals(endpoint.serviceName())) {
        return false;
      }
      if (ipv4 != null && endpoint.ipv4() != null && !ipv4.equals(endpoint.ipv4())) {
        return false;
      }
      if (ipv6 != null && endpoint.ipv6() != null && !ipv6.equals(endpoint.ipv6())) {
        return false;
      }
      if (port != 0 && endpoint.portAsInt() != 0 && port != endpoint.portAsInt()) {
        return false;
      }
      if (serviceName == null) serviceName = endpoint.serviceName();
      if (ipv4 == null) ipv4 = endpoint.ipv4();
      if (ipv6 == null) ipv6 = endpoint.ipv6();
      if (port == 0) port = endpoint.portAsInt();
      return true;
    }
Sometimes endpoints can be sent in pieces. This tracks the whether we should merge with
something, or if it has a different identity.
zipkin/src/main/java/zipkin2/internal/Trace.java