Prior to this commit, the WebClient observations would have a specific lifecycle where the observation context is build with a `ClientRequest.Builder` as tracing needs to add an outgoing request header before the request is made immutable. With this setup, the metrics observation handler processes the start event by increasing the "http.client.requests.active" counter and collecting tags at this point. Because then the immutable request is not yet fully built or set on the context, the keyvalues collected by the observation convention at that point can be incomplete. This commit ensures that a request is always made available in the context, even if it is updated right after the observation start. The only difference between the two should be additional tracing headers and a request attribute holding the current observation context. Closes gh-31702 |
||
|---|---|---|
| .. | ||
| src | ||
| spring-webflux.gradle | ||