-
Notifications
You must be signed in to change notification settings - Fork 38.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure that client responses are observed when filters fail
Prior to this commit, an error thrown by a `ExchangeFilterFunction` configured on a `WebClient` instance would be recorded as such by the client observation, but the response details would be missing from the observation. All filter functions and the exchange function (performing the HTTP call) would be merged into a single `ExchangeFunction`; this instance was instrumented and osberved. As a result, the instrumentation would only get the error signal returned by the filter function and would not see the HTTP response even if it was received. This means that the recorded observation would not have the relevant information for the HTTP status. This commit ensures that between the configured `ExchangeFilterFunction` and the `ExchangeFunction`, an instrumentation `ExchangeFilterFunction` is inserted. This allows to set the client response to the observation context, even if a later error signal is thrown by a filter function. Note that with this change, an error signal sent by a filter function will be still recorded in the observation. See gh-30059
- Loading branch information
Showing
3 changed files
with
47 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters