-
Notifications
You must be signed in to change notification settings - Fork 986
Open
Labels
bugSomething isn't workingSomething isn't workingneeds triageNew issue that requires triageNew issue that requires triage
Description
Describe the bug
RestClient
is currently instrumented using a BeanPostProcessor.
However, it is typical to use the RestClient
using the RestClient.Builder
e.g.
RestClient.builder()
.baseUrl("http://localhost:8080")
.requestInterceptors(System.out::println)
.build()
.get()
.retrieve()
.body(String.class);
In this case no instrumentation is present.
Steps to reproduce
Create a RestClient using the Builder. Have it print its interceptors.
Observe that the list is empty.
RestClient.builder()
.baseUrl("http://localhost:8080")
.requestInterceptors(System.out::println)
.build()
.get()
.retrieve()
.body(String.class);
Expected behavior
A interceptor is added to the RestClient.
Actual behavior
No interceptor is added.
Javaagent or library instrumentation version
2.17
Environment
JDK:
OpenJDK
OS:
Windows/Linux
Additional context
Solution
The RestClient
should be instrumented in a similar fashion to the WebClient
Tip
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1
or me too
, to help us triage it. Learn more here.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingneeds triageNew issue that requires triageNew issue that requires triage