code: @Override
  	public Message<?> beforeHandle(Message<?> message, MessageChannel channel,
  			MessageHandler handler) {
  		if (emptyMessage(message)) {
  			return message;
  		}
  		MessageHeaderAccessor headers = mutableHeaderAccessor(message);
  		TraceContextOrSamplingFlags extracted = this.extractor.extract(headers);
  		// Start and finish a consumer span as we will immediately process it.
  		Span consumerSpan = this.tracer.nextSpan(extracted);
  		if (!consumerSpan.isNoop()) {
  			consumerSpan.kind(Span.Kind.CONSUMER).start();
  			consumerSpan.remoteServiceName(REMOTE_SERVICE_NAME);
  			addTags(message, consumerSpan, channel);
  			consumerSpan.finish();
  		}
  		// create and scope a span for the message processor
  		this.threadLocalSpan
  				.next(TraceContextOrSamplingFlags.create(consumerSpan.context()))
  				.name("handle").start();
  		// remove any trace headers, but don't re-inject as we are synchronously
  		// processing the
  		// message and can rely on scoping to access this span later.
  		MessageHeaderPropagation.removeAnyTraceHeaders(headers,
  				this.tracing.propagation().keys());
  		if (log.isDebugEnabled()) {
  			log.debug("Created a new span in before handle" + consumerSpan);
  		}
  		if (message instanceof ErrorMessage) {
  			return new ErrorMessage((Throwable) message.getPayload(),
  					headers.getMessageHeaders());
  		}
  		headers.setImmutable();
  		return new GenericMessage<>(message.getPayload(), headers.getMessageHeaders());
  	}
docs: This starts a consumer span as a child of the incoming message or the current trace
  context. It then creates a span for the handler, placing it in scope.