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

Trace stdout from test-proxy #2274

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

heaths
Copy link
Member

@heaths heaths commented Mar 4, 2025

This is a big refactor of the test-proxy wrapper that will precede other work. This will help diagnose issues that, in the past, you could only do if you started the test-proxy separately and remembered to pass PROXY_MANUAL_START=true when testing.

This is a big refactor of the test-proxy wrapper that will precede other work. This will help diagnose issues that, in the past,  you could only do if you started the test-proxy separately and remembered to pass `PROXY_MANUAL_START=true` when testing.
@heaths heaths requested a review from RickWinter as a code owner March 4, 2025 05:30
@heaths heaths requested a review from scbedd March 4, 2025 05:30
@heaths heaths requested a review from analogrelay March 4, 2025 05:30
@heaths heaths requested a review from ronniegeraghty as a code owner March 4, 2025 05:30
@github-actions github-actions bot added the Azure.Core The azure_core crate label Mar 4, 2025
@heaths
Copy link
Member Author

heaths commented Mar 4, 2025

I've been wanting to do this for a while because it would've helped a couple weeks ago trying to figure out why playback wasn't working in certain circumstances. It was only once I ran the test-proxy separate and watched its logs I could tell; however, interspersing stdout from test-proxy - which cargo test would swallow anyway - would make things more difficult. So, instead, I capture its stdout - which I already was to only get the version and port binding - and trace it all!

image

I also added a troubleshooting section to the azure_core_test README.md that explains a bit. Basically, by tracing this information it provides a lot of opportunity to customize what level of information - and from where - you want to see. For example, hyper writes a lot of trace information you probably rarely want to see, if ever...so don't!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Azure.Core The azure_core crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant