Skip to content

RestClient ignores baseUrl when setting URI_TEMPLATE_ATTRIBUTE #33927

Description

@sonallux

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.

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)status: supersededAn issue that has been superseded by another

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions