It will be fine, to have metrics support for reactive org.springframework.web.reactive.function.client.WebClient. Currently there is support only for standard RestTemplate.
This depends on https://jira.spring.io/browse/SPR-16537. We currently don't have access to the parameterized URI to tag WebClient metrics with.
The upstream issue is resolved now, Is this still blocked?
Nope, no longer blocked, but won't be picked up until Boot 2.1 I'm guessing.
It's in 5.0.5, so maybe 2.0.1?
Yay!
Was this in 2.0.2?
@bjartek perhaps you鈥檙e using GitHub on your phone? If you don鈥檛 there is a milestone label on the right
Yes this was on my phone. Sorry for the noice.
@bclozel Should this use the Reactor context to set the start time? I believe this could result in incorrect timings when the sequence is re-subscribed to. The specific scenario I'm thinking of is when using retries in Reactor. When the sequence is retried the duration will be the sum of the previous durations.
edit: Just added a commit for what I had in mind.
Good catch @michael-barker !
This is now fixed with an additional test and a slightly different approach - using the Context is right, but doOnEach considers all signals, including onComplete (and we don't want to record metrics for that signal, in this case).
@bclozel Thanks!
Thanks!
Yes. Any WebClient created via the auto-configured WebClient.Builder should be instrumented when you have Actuator on the classpath. If that's not happening for you, please open a new issue with a minimal and complete sample that reproduces the problem.
@wilkinsona Thanks, I just found this precondition. Previously I didn't use injected builder.
Most helpful comment
Yay!