-
Notifications
You must be signed in to change notification settings - Fork 41.6k
Description
Hello, as of Spring Boot 3 the management.metrics.web.server.request.autotime configuration properties were removed and the following note was left: Should be applied at the ObservationRegistry level.
There's no explanation anywhere on how to do that.
Can something please be added to the documentation, or to the migration guide?
I've found no new alternative to configure the application to automatically measure the durations of RestTemplate exchanges. The only way I can see it being done is by using a custom interceptor that does it somehow. Otherwise I guess we have to explicitly measure times using Observations to wrap the code that uses a RestTemplate to make remote calls?
Sorry if this issue looks "StackOverflow-y" but there's honestly no info about this in the docs and the few already existing questions on StackOverflow have no answers or comments.
Edit: I've found this chapter of the documentation. By what I understand, at least for RestTemplate and WebClient, calls are observed by default, including their duration?
Anyway, for someone who had no idea about the Observations API before having to switch to Spring Boot 3, it's really time-consuming to understand where the feature that was previously granted by management.metrics.web.server.request.autotime.enabled = true ended up. In my opinion it's better to explicitly state, at least in the migration guide, that the new way is to configure an ObservationRegistry on the HTTP client of choice, and that it's done automatically for RestTemplate and WebClient (for now?). Also providing an example in the guide would be great.