Project: https://github.com/Jojoooo1/spring-microservice-webhook-reactive
Version:
Even after using Hooks.enableAutomaticContextPropagation() it seems that nested context does not propagate. It was previously working using sleuth.
First context:

Second context

Does anyone had similar issue and was able to fix it ?
https://github.com/spring-projects/spring-amqp/issues/2560 has solved the problem.
The context is being lost between webclient and rabbit listener you need to add .tap(Micrometer.observation(this.registry)):
return this.webClient
.post()
.uri(url)
.contentType(MediaType.APPLICATION_JSON)
.headers(
httpHeaders ->
headers.forEach((k, v) -> httpHeaders.add(k, v != null ? v.toString() : null)))
.bodyValue(requestBody)
.exchangeToMono(this::defaultResponseHandler)
.tap(Micrometer.observation(this.registry))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With