-
-
Notifications
You must be signed in to change notification settings - Fork 358
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
Support EventListener to decorate HttpTransaction recordings #918
base: main
Are you sure you want to change the base?
Conversation
The reason behind this PR is to understand how long a network request actually takes. Today any interceptor added after Chucker that runs expensive operations, could increase the time required to for a request to actually return to the user. Also will add infos about the time it was required to acquire a connection and the time required by the dns |
Thanks for sending this PR @carlonzo |
Thanks for reviewing my PR. The reason I created it was because this level of granularity may be interesting to be added to get information regarding the health of the network as well as the the cost of the app network stack. On my own project this was important to gather the cost in duration of the connection as well as the the time spent by all the interceptors added to okhttp. Thanks for considering and for maintaining this project. |
True but also quite invasive from the API point of view. How do you feel about having a custom interceptor that does this for you? Why do you feel Chucker should do it instead? |
if you mean I wanted to add this information in Chucker to enhance to overall amount of information a developer could use and see, and think Chucker was the best place to show this. What part of the API you feel is invasive? |
The fact that you're adding 8 new fields in the database + the fact that you added an |
Sorry for the delay, but somehow I didn't see your reply. Thanks for it. For API here I don't understand what you mean. The public API has changed with a new public method available from the Interceptor where I've added The I can see it my change invasive in 2 points:
|
Nope is not. At least not in the current stage as it's not properly encapsulated. |
📷 Screenshots
📄 Context
Added EventListener to decorate recordings for HttoTransaction.
This will allow to record duration for:
todo
I am not sure if this feature is interesting for a Chucker user, but wanted to send a PR to start a discussion of it