-
-
Couldn't load subscription status.
- Fork 101
[talker_dio_logger] added logging of request's extra, configurable #375
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
Conversation
Reviewer's GuideAdds a new configurable option to log request.extra in the Dio logger: introduces and propagates a printRequestExtra setting, updates log formatter to include JSON-formatted extra data when enabled, and adds corresponding tests. Sequence Diagram: Logging Request 'extra' ConditionallysequenceDiagram
participant DioClient
participant TalkerDioLogger as "TalkerDioLogger (Interceptor)"
participant RequestOptions
participant Settings as "TalkerDioLoggerSettings"
participant DioRequestLog as "DioRequestLog (Log Object)"
participant Talker as "Talker (Logging Backend)"
DioClient->>TalkerDioLogger: onRequest(options, handler)
activate TalkerDioLogger
TalkerDioLogger->>DioRequestLog: new DioRequestLog(options, settings)
activate DioRequestLog
DioRequestLog->>Settings: Reads settings.printRequestExtra
alt if settings.printRequestExtra is true
DioRequestLog->>RequestOptions: Reads options.extra
Note right of DioRequestLog: Includes 'extra' in log message
end
DioRequestLog-->>TalkerDioLogger: log object (message generated)
deactivate DioRequestLog
TalkerDioLogger->>Talker: log(log object)
TalkerDioLogger->>DioClient: handler.next(options)
deactivate TalkerDioLogger
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @lucavenir - I've reviewed your changes - here's some feedback:
- Consider adding error handling in the catch block for extra encoding failures so you can log a fallback message instead of silently swallowing exceptions.
- Add a test to verify that extras are not logged when
printRequestExtrais false (default), ensuring the new flag behaves correctly.
Here's what I looked at during the review
- π‘ General issues: 1 issue found
- π’ Security: all looks good
- π’ Testing: all looks good
- π’ Complexity: all looks good
- π’ Documentation: all looks good
Help me be more useful! Please click π or π on each comment and I'll use the feedback to improve your reviews.
|
Codecov ReportAll modified and coverable lines are covered by tests β
β Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #375 +/- ##
==========================================
+ Coverage 98.17% 98.61% +0.43%
==========================================
Files 28 3 -25
Lines 603 144 -459
==========================================
- Hits 592 142 -450
+ Misses 11 2 -9 β View full report in Codecov by Sentry. π New features to boost your workflow:
|
solves #357
Summary by Sourcery
Introduce a configurable printRequestExtra flag to TalkerDioLoggerSettings and update the interceptor and log generator to include request.extra data in logs when enabled.
New Features:
Tests: