This is to address issue - RestClient doesn't open a scope for the processing of the request #33397. The scope is now opened and properly closed, which ensures that any observations captured during the execution are appropriately handled, even in the presence of exceptions.
Changes - Refactored exchangeInternal method to manage Observation.Scope more effectively. - Added a test to verify the proper creation and closure of the observation scope.
Comment From: bclozel
Thanks for the proposal @prkksh but the issue was already assigned and work was in progress. You can see that I went with different changes in #33397.