Add unsupported config option for logging HTTP data to pcap file #6813
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This patch adds an option to the netty config to set a file path pattern where pcap dumps are written to. For every connection, two files are created, one for the "full" stream (qualifier: 'encapsulated'), and one with the ssl removed (qualifier: 'ssl-decapsulated').
I've been using similar code for debugging HTTP issues for a while, especially the decapsulated approach. Adding this to core behind a config option allows us to use this logging for hard-to-reproduce issues as well.
Because the config option is marked as
@Internal
, and the code path does nothing if the option is not set, there should be little risk to this change.To prevent users shooting themselves in the foot by forgetting to turn off this option, there is a log warning on every request.