chucker
chucker copied to clipboard
Support for manual transaction logging
:page_facing_up: Context
Add Support for manual transaction logging in the chucker. For example, developers can populate MQTT
or FCM messages
transactions into their chucker log; these are other types of network traffic, and showing them in chucker makes this library more generic for network transaction logging.
:pencil: Changes
- I've added added
saveTransaction(transaction: ManualHttpTransaction)
method toChuckerCollector
to save manual transaction data into DB. - I've added a new
ManualHttpTransaction
entity to the API package for the manual type of logging. It is wrapped over the internalHttpTransaction
entity and ensures that previous visibility is not violated.
:no_entry_sign: Breaking
No breaking changes introduced
:hammer_and_wrench: How to test
Just run the sample app. The new ManualTransactionTask is added to the sample app MainActivity
httpTasks to test if this feature is working OK.
I've checked issues and found that issue #140 also wants this feature.
Thanks for sending this @aliab 🙏 I think we can simplify this a bit
Thanks for sending this @aliab 🙏 I think we can simplify this a bit
I tried to make as few changes as possible. btw, I want this feature in my app and if you give me a hint about your idea, maybe I could deliver it sooner.
@cortinico kindly reminder
@cortinico kindly reminder
Hey @aliab I've took a closer look at this change and I think we can't merge it now. Specifically as I'd like to focus on:
- https://github.com/ChuckerTeam/chucker/issues/259
- https://github.com/ChuckerTeam/chucker/issues/579
Exposing the Manual class you suggested exposes us to having to maintain this in the long run. As we're planning on potentially separating requests and responses, having a class in the public API which doesn't follow this design would be harder to maintain the future.
Let's get back to this once we're done with the redesign.