Revert #1418, #1367, introduce public version of RestMethodInfo#1496
Conversation
5faf4b4 to
772c6a0
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #1496 +/- ##
==========================================
+ Coverage 89.73% 90.08% +0.35%
==========================================
Files 34 33 -1
Lines 1705 1685 -20
==========================================
- Hits 1530 1518 -12
+ Misses 175 167 -8
☔ View full report in Codecov by Sentry. |
|
@james-s-tayler Can you make sure that the change proposed here still works for your use-case? |
|
@anaisbetts I think it will. |
|
I was looking forward to the changes in #1418 being released, can I ask why it was reverted? Current name schemes coming from the |
|
@cbrevik I reverted it because the implementation was too Java'y and it was extremely unclear from the PR what problem this actually solves or why it should exist - can you explain further? |
|
The problem it solves relates to how other logging and metric libraries logs the name of the HTTP-client. See for example #1467 in this repository and the issue it links back to from the Serilog-repository: serilog/serilog#1793 (comment) Serilog pulls the Logging of "normal" HTTP-clients will be in this format: Whilst logging of Refit-clients will be like this: Which including the prefixed stuff includes Version, PublicKeyToken etc. Mostly then because of the implementation of https://github.com/reactiveui/refit/blob/main/Refit/UniqueName.cs I've seen the same issue with for example using Prometheus, a sample metric from there: So the issue is that it really bloats the logs and metrics up, and makes them a bit unreadable. Especially if you have (like we have) several different HTTP-clients with Refit. So I'd like for the generated name to be either shorter by default (and I see from your explanation why it shouldn't), or at least make it overridable if not (like in #1418 or a less Java-y solution)
|
This reverts commit b78bbc7.
1100a8f to
4bf75bb
Compare
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Reverts #1418 and #1367, we will add the functionality of #1367 back as part of a fixed up version of #1317, and we'll re-evaluate #1418. This PR also removes access to the internal type RestMethodInfo, replacing it with a read-only sanitized version. While initially this public type will be limited, we can evaluate adding new fields as-needed.
TODO:
RestMethodInfoavailable in the request options #1317 without using internal types