[kotlin-client][jvm-spring-webclient] Fix metrics URI templating for WebClient#20750
[kotlin-client][jvm-spring-webclient] Fix metrics URI templating for WebClient#20750paul-kraftlauget wants to merge 0 commit intoOpenAPITools:masterfrom
Conversation
|
please follow step 3 in PR checklist to update the samples so that CI can test the change cc @dr4ke616 (2018/08) @karismann (2019/03) @Zomzog (2019/04) @andrewemery (2019/10) @4brunu (2019/11) @yutaka0m (2020/03) @stefankoppier (2022/06) @e5l (2024/10) |
|
To test this, the test would need to generate the client code for a REST service that has query parameters or path parameters, write some code to call that, set up wiremock to mock a REST call, fire the call off, check the Spring metrics that it is templated and does not contain the raw path or query params. This is the behaviour that needs tested. And when generated code is compiled, there shouldn't be any warnings. I looked at the test cases for spring. I didn't see any that run the spring environment with the generated code. If there is a good way to test the behaviour by running generated code, could you please point me to an example? |
|
did you test the fix locally in your environment to confirm it works for your use cases? |
|
Yes, I have been running the fix in production, by using the gradle plugin config:
And this exact fix in the file:
The metrics are correct, using templated metrics: |
|
Without the fix, the metrics look like this: The REST client calls with templates just appear as uri -> "none", so you don't even see the endpoints being called. |
|
can you please resolve the merge conflicts when you've time? |
c12fcb6 to
bdb063f
Compare
|
I opened a new PR with the merge conflicts resolved. See #21148 |
Fixes #16923
Also removes compile warning