Skip to content
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

RestClient ignores baseUrl when setting URI_TEMPLATE_ATTRIBUTE #33927

Closed
sonallux opened this issue Nov 20, 2024 · 1 comment
Closed

RestClient ignores baseUrl when setting URI_TEMPLATE_ATTRIBUTE #33927

sonallux opened this issue Nov 20, 2024 · 1 comment
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) status: superseded An issue that has been superseded by another theme: observability An issue related to observability and tracing

Comments

@sonallux
Copy link
Contributor

When using the RestClient with specifiying a baseUrl containing a path, this path is not present at the observation uri key.

For example when making the following request, the http.client.requests observation low cardinality key uri only contains the value /test. But I would expect that the uri key contains the full path of the request /foo/bar/test.

RestClient.Builder restClientBuilder = ...
String response = restClientBuilder.baseUrl("/foo/bar").build()
                .get().uri("/test").retrieve().body(String.class);

The same issue does not exists when using the WebClient because this has been fixed with issue #30027.

I am going to provide a PR to fix this issue.

sonallux added a commit to sonallux/spring-framework that referenced this issue Nov 20, 2024
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Nov 20, 2024
sonallux added a commit to sonallux/spring-framework that referenced this issue Nov 20, 2024
@bclozel bclozel self-assigned this Nov 21, 2024
@bclozel bclozel added in: web Issues in web modules (web, webmvc, webflux, websocket) theme: observability An issue related to observability and tracing labels Nov 21, 2024
@bclozel
Copy link
Member

bclozel commented Nov 21, 2024

Closing on favor of #33928

@bclozel bclozel closed this as not planned Won't fix, can't repro, duplicate, stale Nov 21, 2024
@bclozel bclozel added status: superseded An issue that has been superseded by another and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) status: superseded An issue that has been superseded by another theme: observability An issue related to observability and tracing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants