Duplicate observations recorded with RestClient #33068
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
theme: observability
An issue related to observability and tracing
type: bug
A general bug
Milestone
Hi,
I'm using spring-boot 3.3.0 (spring-framework 6.1.8). After migration from spring-boot 3.2.5, the metrics are false because the timer for RestClient counts twice the calls (
http.client.request
).This can be reproduced with a simple spring boot test:
The problem seems to be (to my opinion) that Timer.stop is called twice:
clientResponse
isAutoClosable
(close stops the observation),finally
on L254 (observation.stop is called a second time) (observation.stop() calls indirectly Timer$Sample.stop()).I hope my analysis will be helpfull.
Thanks.
The text was updated successfully, but these errors were encountered: