ServiceRelation toServiceRelation() {
        ServiceRelation serviceRelation = new ServiceRelation();
        serviceRelation.setSourceServiceName(sourceServiceName);
        serviceRelation.setSourceServiceInstanceName(sourceServiceInstanceName);
        serviceRelation.setSourceLayer(sourceLayer);
        serviceRelation.setDestServiceName(destServiceName);
        serviceRelation.setDestServiceInstanceName(destServiceInstanceName);
        serviceRelation.setDestLayer(destLayer);
        serviceRelation.setEndpoint(destEndpointName);
        serviceRelation.setComponentId(componentId);
        serviceRelation.setLatency(latency);
        serviceRelation.setStatus(status);
        serviceRelation.setHttpResponseStatusCode(httpResponseStatusCode);
        serviceRelation.setRpcStatusCode(rpcStatusCode);
        serviceRelation.setType(type);
        serviceRelation.setDetectPoint(detectPoint);
        serviceRelation.setTimeBucket(timeBucket);
        return serviceRelation;
    }
Service topology meta and metrics related source. The metrics base on the OAL scripts.
oap-server/analyzer/agent-analyzer/src/main/java/org/apache/skywalking/oap/server/analyzer/provider/trace/parser/listener/RPCTrafficSourceBuilder.java