Skip to content

Documentation of ObservationRestTemplateCustomizer as replacement of MetricsRestTemplateCustomizer #35918

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
MahatmaFatalError opened this issue Jun 15, 2023 · 6 comments
Labels
status: declined A suggestion or change that we don't feel we should currently apply theme: observability Issues related to observability type: wiki-documentation A documentation update required on the wiki

Comments

@MahatmaFatalError
Copy link
Contributor

This issue #32484 with commit eac50a8#diff-4cdef5c5ee8ef10a5d751cbb07a000805bac055f8fa8a1620b0e219826e3eb74 removed org.springframework.boot.actuate.metrics.web.client.MetricsRestTemplateCustomizer and introduced org.springframework.boot.actuate.metrics.web.client.ObservationRestTemplateCustomizer. I assume the latter is a drop-in replacement, I don't know.

IMHO this breaking change should be documented, maybe https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0-Migration-Guide or https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0-Release-Notes.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jun 15, 2023
@philwebb philwebb added type: wiki-documentation A documentation update required on the wiki and removed status: waiting-for-triage An issue we've not yet triaged labels Jun 15, 2023
@philwebb philwebb added this to the 3.0.x milestone Jun 15, 2023
@jonatan-ivanov jonatan-ivanov added the theme: observability Issues related to observability label Jun 16, 2023
@GirishSrinivas
Copy link

Hi,
we are doing the spring boot 3 migrations, and we are using the claas MetricsRestTemplateCustomizer for the restTemplate, we have not see any documentation about this change.
It would be greatly appreciated if you can point us to any documentation for the migration of MetricsRestTemplateCustomizer to ObservationRestTemplateCustomizer

@bclozel
Copy link
Member

bclozel commented Sep 15, 2023

Can you elaborate on why are you using this customizer in the first place? What type of customization are you applying here? I'm asking this because you are not required to define your own and this should be mostly a transparent change for Boot users.

@bclozel bclozel added the status: waiting-for-feedback We need additional information before we can continue label Sep 15, 2023
@spring-projects-issues
Copy link
Collaborator

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

@spring-projects-issues spring-projects-issues added the status: feedback-reminder We've sent a reminder that we need additional information before we can continue label Sep 22, 2023
@spring-projects-issues
Copy link
Collaborator

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.

@spring-projects-issues spring-projects-issues closed this as not planned Won't fix, can't repro, duplicate, stale Sep 29, 2023
@spring-projects-issues spring-projects-issues removed status: waiting-for-feedback We need additional information before we can continue status: feedback-reminder We've sent a reminder that we need additional information before we can continue labels Sep 29, 2023
@wilkinsona wilkinsona removed this from the 3.0.x milestone Sep 29, 2023
@wilkinsona wilkinsona added the status: declined A suggestion or change that we don't feel we should currently apply label Sep 29, 2023
@MahatmaFatalError
Copy link
Contributor Author

@wilkinsona we used

metricsRestTemplateCustomizer.customize(restTemplate);

and now needed to replace it with

observationRestTemplateCustomizer.customize(restTemplate);

to access /actuator/metrics/http.client.requests metrics.

@bclozel
Copy link
Member

bclozel commented Oct 9, 2023

Given the use case, I'm not sure we need to add much more in the docs. You're not really supposed to use the customizers directly but rather inject a RestTemplateBuilder in your application. I've added a note in the migration wiki still.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: declined A suggestion or change that we don't feel we should currently apply theme: observability Issues related to observability type: wiki-documentation A documentation update required on the wiki
Projects
None yet
Development

No branches or pull requests

7 participants