-
Notifications
You must be signed in to change notification settings - Fork 383
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
WIP do not merge: Dump HTTP operations #201
base: main
Are you sure you want to change the base?
Conversation
Isn't this adding overhead to the command? I'm fine with this, just want to make sure we don't wait that much dumping req/res. |
Any way to pass down a debug flag? Or just rebuild with a DEBUG Tag? |
Yes, and it completely clutters the debugging output. As I said
|
We have a |
27bdf9e
to
eb7a685
Compare
a49b9fb
to
a7f917d
Compare
7db1b51
to
4a5b2b5
Compare
e7030b7
to
b8d0cc5
Compare
b727325
to
ef4adfb
Compare
2f2b680
to
974b583
Compare
Just needs to have an update to the transports man page. |
a47fd12
to
9daf744
Compare
afb1bba
to
8595d76
Compare
4f07126
to
92b4a86
Compare
In addition to the previously-noted concerns about opt-in, this should almost certainly be reworked to become a |
This would be very useful for troubleshooting issues with access to remote registries. At the moment, I tend to opt for a set up with a transparent TLS proxy to snoop on this type of traffic, but having a log that exposes this type of data that can be easily enabled would be ideal. |
For the record, Red Hat internal tracking: https://issues.redhat.com/browse/RHEL-36783 |
WARNING: This includes credentials, if any. Signed-off-by: Miloslav Trmač <[email protected]>
Quite often it has been useful to dump the full HTTP request and response headers, and sometimes fuill bodies, for debugging; we probably should make that possible either automatically at the “debug” log level, or when the user sets an option.
This is by no means a workable implementation for that, but I’ve written exactly this hack two or three times now, so right now I am at least recording it for posterity, expecting that rebasing it will be easier than rewriting it.
A real implementation should, I guess, wrap a
http.RoundTripper
or perhapshttp.Client
(or justhttp.Client.Do
?), or perhaps usingnet/http/httptrace
somehow.