@ -33,6 +33,7 @@ import java.util.function.Supplier;
@@ -33,6 +33,7 @@ import java.util.function.Supplier;
import io.micrometer.observation.Observation ;
import io.micrometer.observation.ObservationRegistry ;
import io.micrometer.observation.contextpropagation.ObservationThreadLocalAccessor ;
import org.reactivestreams.Publisher ;
import reactor.core.publisher.Flux ;
import reactor.core.publisher.Mono ;
@ -75,11 +76,6 @@ class DefaultWebClient implements WebClient {
@@ -75,11 +76,6 @@ class DefaultWebClient implements WebClient {
private static final DefaultClientRequestObservationConvention DEFAULT_OBSERVATION_CONVENTION = new DefaultClientRequestObservationConvention ( ) ;
/ * *
* Aligned with ObservationThreadLocalAccessor # KEY from micrometer - core .
* /
private static final String MICROMETER_OBSERVATION = "micrometer.observation" ;
private final ExchangeFunction exchangeFunction ;
private final UriBuilderFactory uriBuilderFactory ;
@ -463,7 +459,7 @@ class DefaultWebClient implements WebClient {
@@ -463,7 +459,7 @@ class DefaultWebClient implements WebClient {
DEFAULT_OBSERVATION_CONVENTION , ( ) - > observationContext , observationRegistry ) ;
observationContext . setCarrier ( requestBuilder ) ;
observation
. parentObservation ( contextView . getOrDefault ( MICROMETER_OBSERVATION , null ) )
. parentObservation ( contextView . getOrDefault ( ObservationThreadLocalAccessor . KEY , null ) )
. start ( ) ;
ClientRequest request = requestBuilder . build ( ) ;
observationContext . setUriTemplate ( ( String ) request . attribute ( URI_TEMPLATE_ATTRIBUTE ) . orElse ( null ) ) ;