Add documentation on conditions when DefaultWebClientAdvice is not applied
This commit is contained in:
parent
633db43cb1
commit
0043efa164
|
@ -17,6 +17,11 @@ public class DefaultWebClientAdvice {
|
||||||
@Advice.Return(readOnly = false) Mono<ClientResponse> mono) {
|
@Advice.Return(readOnly = false) Mono<ClientResponse> mono) {
|
||||||
if (throwable == null
|
if (throwable == null
|
||||||
&& mono != null
|
&& mono != null
|
||||||
|
// The response of the org.springframework.web.reactive.function.client.ExchangeFunction.exchange method is
|
||||||
|
// replaced by a decorator that in turn also calls the
|
||||||
|
// org.springframework.web.reactive.function.client.ExchangeFunction.exchange method. If the original return value
|
||||||
|
// is already decorated (we detect this if the "x-datadog-trace-id" is added), the result is not decorated again
|
||||||
|
// to avoid StackOverflowErrors.
|
||||||
&& !clientRequest.headers().keySet().contains("x-datadog-trace-id")) {
|
&& !clientRequest.headers().keySet().contains("x-datadog-trace-id")) {
|
||||||
mono = new TracingClientResponseMono(clientRequest, exchangeFunction, GlobalTracer.get());
|
mono = new TracingClientResponseMono(clientRequest, exchangeFunction, GlobalTracer.get());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue