code: protected void processNoPrimaryReference(APMSpanBuilder builder, TraceRecorder recorder, ContextSampler sampler) {
          // No primary reference found, so means that all references will be treated
          // as equal, to provide a join construct within a separate fragment.
          initTopLevelState(this, recorder, sampler);
  
          Set<String> traceIds = builder.references.stream().map(ref -> {
              if (ref.getReferredTo() instanceof APMSpan) {
                  return ((APMSpan) ref.getReferredTo()).getTraceContext().getTraceId();
              } else if (ref.getReferredTo() instanceof APMSpanBuilder) {
                  return ((APMSpanBuilder) ref.getReferredTo()).state().get(Constants.HAWKULAR_APM_TRACEID).toString();
              }
              log.warning("Reference refers to an unsupported SpanContext implementation: " + ref.getReferredTo());
              return null;
          }).collect(Collectors.toSet());
  
          if (traceIds.size() > 0) {
              if (traceIds.size() > 1) {
                  log.warning("References should all belong to the same 'trace' instance");
              }
              if (builder.references.get(0).getReferredTo() instanceof APMSpan) {
                  traceContext.initTraceState(((APMSpan) builder.references.get(0).getReferredTo()).state());
              }
          }
  
          processRemainingReferences(builder, null);
  
          makeInternalLink(builder);
      }
docs: This method initialises the span based on there being no primary reference.
  
  @param builder  The span builder
  @param recorder The trace recorder
  @param sampler The sampler