Skip to content
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

Add unsupported config option for logging HTTP data to pcap file #6813

Merged
merged 2 commits into from
Jan 26, 2022

Conversation

yawkat
Copy link
Member

@yawkat yawkat commented Jan 26, 2022

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.

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.
@yawkat yawkat added the type: improvement A minor improvement to an existing feature label Jan 26, 2022
@yawkat yawkat added this to the 3.3.0 milestone Jan 26, 2022
@jameskleeh jameskleeh merged commit 4751897 into 3.3.x Jan 26, 2022
@jameskleeh jameskleeh deleted the http-network-logging branch January 26, 2022 16:26
yawkat added a commit that referenced this pull request Jun 24, 2022
* Add unsupported config option for logging HTTP data to pcap file
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.

* fix test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: improvement A minor improvement to an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants