WebClient observations should not record CANCEL signals as aborted if response was received #30070
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
theme: observability
An issue related to observability and tracing
type: enhancement
A general enhancement
Milestone
A couple years ago I opened an issue about how the cancellation signal was not being properly handled: spring-projects/spring-boot#18444
On it, we ended up implementing a solution where the cancellation signal would only be processed in case it was received without any onNext signal being emitted before:
That was the way it was approached on Spring Boot 2.x:
With the new Observation API implementation, the onCancel signal is being processed without checking if the onNext signal has already being processed, creating the same problems I was describing on the old issue:
I believe it would make sense to introduce a check on the
onCancel()
as, right now, a WebClient call that receives a Flux and converts and calls a method like.next()
ortake(n)
registers each call twice (one as SUCCESS and one as CLIENT_ERROR).EDIT: sorry, missclicked when creating the issue, before adding any description or a proper title
The text was updated successfully, but these errors were encountered: