@Override
    public void build() {
        callingInTraffic.forEach(callingIn -> {
            callingIn.prepare();
            sourceReceiver.receive(callingIn.toService());
            sourceReceiver.receive(callingIn.toServiceInstance());
            sourceReceiver.receive(callingIn.toServiceRelation());
            sourceReceiver.receive(callingIn.toServiceInstanceRelation());
            // Service is equivalent to endpoint in FaaS (function as a service)
            // Don't generate endpoint and endpoint dependency to avoid unnecessary costs.
            if (Layer.FAAS != callingIn.getDestLayer()) {
                sourceReceiver.receive(callingIn.toEndpoint());
                EndpointRelation endpointRelation = callingIn.toEndpointRelation();
                /*
                 * Parent endpoint could be none, because in SkyWalking Cross Process Propagation Headers Protocol v2,
                 * endpoint in ref could be empty, based on that, endpoint relation maybe can't be established.
                 * So, I am making this source as optional.
                 *
                 * Also, since 6.6.0, source endpoint could be none, if this trace begins by an internal task(local span or exit span), such as Timer,
                 * rather than, normally begin as an entry span, like a RPC server side.
                 */
                if (endpointRelation != null) {
                    sourceReceiver.receive(endpointRelation);
                }
            }
        });

        callingOutTraffic.forEach(callingOut -> {
            callingOut.prepare();
            sourceReceiver.receive(callingOut.toServiceRelation());

            /*
             * Some of the agent can not have the upstream real network address, such as https://github.com/apache/skywalking-nginx-lua.
             */
            final ServiceInstanceRelation serviceInstanceRelation = callingOut.toServiceInstanceRelation();
            if (serviceInstanceRelation != null) {
                sourceReceiver.receive(serviceInstanceRelation);
            }
        });
        logicEndpointBuilders.forEach(logicEndpointBuilder -> {
            logicEndpointBuilder.prepare();
            sourceReceiver.receive(logicEndpointBuilder.toEndpoint());
        });
    }
The exit span should be transferred to the service, instance and relationships from the client side detect
point.
oap-server/analyzer/agent-analyzer/src/main/java/org/apache/skywalking/oap/server/analyzer/provider/trace/parser/listener/RPCAnalysisListener.java