Add Netty handler to log HTTP wire traffic - #237
Conversation
… Covered with test that verifies the logs are printed
Changelog and Version ManagementNo changelog or version changes detected. You can either update them manually or use a comment command to update them automatically on merge:
Omit the entry line to use the PR title. If multiple commands are posted, the last one wins. |
…est, response, close)
…hen the default 4K
donoghuc
left a comment
There was a problem hiding this comment.
Overall this looks good and works as advertised. Have a couple small suggestions.
Also, will this be a new minor release?
Co-authored-by: Cas Donoghue <cas.donoghue@gmail.com>
…rt invoke into the plugin's register method
Given that's a new feature, I think it has to be a new minor. |
…ogstash starts in debug with --debug
donoghuc
left a comment
There was a problem hiding this comment.
Super small typo other than that this is g2g
in a minor release.
Co-authored-by: Cas Donoghue <cas.donoghue@gmail.com>
|
/pr_prepare release:minor
|
…ler to log HTTP wire traffic (#237)'
Implements a functionality to log HTTP traffic. It's enabled by enabling debug log. As a user that want's to debug his data flow I need to be able to track what's effectively sent to the HTTP input socket. - Created new WireLogger Netty handler to log information about channel opening/closing and dumping read and write traffic. - Truncate the dumped content to 4KB or can be customised by setting `logstash.httpinput.wire.dump.size` Java system property. - Updated client channel initializer to include such handler. - Updates Java target and source compatibility to use HttpClient provided by JDK standard library since version 11. Co-authored-by: Cas Donoghue <cas.donoghue@gmail.com> * Bumped 3.11.0 --------- Co-authored-by: Cas Donoghue <cas.donoghue@gmail.com>
Release notes
Implements a functionality to log HTTP traffic. It's enabled by enabling debug log.
What does this PR do?
logstash.httpinput.wire.dump.sizeJava system property.Why is it important/What is the impact to the user?
As a user that want's to debug his data flow I need to be able to track what's effectively sent to the HTTP input socket.
Checklist
Author's Checklist
How to test this PR locally
Run a Logstash pipeline which includes an HTTP input filter enabling the logger in
config/log4j2.propertieswith:Related issues
Use cases
Given some issue with the messages received from an HTTP input I want to enable debug logging to check what's in transit on the TCP level, after the TLS layer.
Logs
Produced logs for gzipped content:
Produced logs for plain content: