code: public static List<SourceInfo> getSourceInfo(String tenantId, List<Trace> items)
                                  throws RetryAttemptException {
          List<SourceInfo> sourceInfoList = new ArrayList<SourceInfo>();
  
          int curpos=0;
  
          // This method initialises the deriver with a list of trace fragments
          // that will need to be referenced when correlating a consumer with a producer
          for (int i = 0; i < items.size(); i++) {
  
              // Need to check for Producer nodes
              Trace trace = items.get(i);
              StringBuffer nodeId = new StringBuffer(trace.getFragmentId());
  
              for (int j = 0; j < trace.getNodes().size(); j++) {
                  Node node = trace.getNodes().get(j);
                  int len = nodeId.length();
  
                  initialiseSourceInfo(sourceInfoList, tenantId, trace, nodeId, j,
                          node);
  
                  // Trim the node id for use with next node
                  nodeId.delete(len, nodeId.length());
              }
  
              // Apply origin information to the source info
              EndpointRef ep = EndpointUtil.getSourceEndpoint(trace);
              for (int j=curpos; j < sourceInfoList.size(); j++) {
                  SourceInfo si = sourceInfoList.get(j);
                  si.setEndpoint(ep);
              }
  
              curpos = sourceInfoList.size();
          }
  
          return sourceInfoList;
      }
docs: This method gets the source information associated with the supplied
  traces.
  
  @param tenantId The tenant id
  @param items The trace instances
  @return The source info
  @throws RetryAttemptException Failed to initialise source information