Basically what I described on Stack overflow.

I created a minimal reproduction example on my github

Comment From: wilkinsona

Thanks for opening this, @mreilaender, and for the sample too.

Comment From: wilkinsona

I think this is also broken at runtime. The URL tag of the metric is incorrect as the URL is pushed onto the UrlTemplateThreadLocal before the root is applied to it. I've opened https://github.com/spring-projects/spring-boot/issues/25744 for that part of the problem.

Comment From: wilkinsona

The fix for #25744 should fix this one as well. The changes in this branch build upon those for #25744, adding a test for MockRestServiceServer when the metrics instrumentation and a root URI are in play.