-
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.
Improve WebClient observations handling of CANCEL signal
Prior to this commit, `WebClient` observations would be recorded as aborted (with tags "outcome":"UNKNOWN", "status":"CLIENT_ERROR") for use cases like this: ``` Flux<String> result = client.get() .uri("/path") .retrieve() .bodyToFlux(String.class) .take(1); ``` This is due to operators like `take` or `next` that consume *some* `onNext` signals and then cancels the subscription before completion. This means the subscriber is only partially interested in the response and we should not count this as a client error. This commit ensures that observations are only recorded as aborted if the response was not published at the time the CANCEL signal was received. The code snippet above will now publish observations with "outcome":"SUCCESS" and "status":"200" tags, for example. Closes gh-30070
- Loading branch information
Showing
2 changed files
with
53 additions
and
4 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