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 tooling #453

Merged
merged 3 commits into from
Jan 25, 2025
Merged

Trace tooling #453

merged 3 commits into from
Jan 25, 2025

Conversation

mtrudel
Copy link
Owner

@mtrudel mtrudel commented Jan 10, 2025

This is a WiP PR that adds some experimental tracing support to Bandit in order to facilitate easier diagnosis of ephemeral issues that users report such as #412, #431, #438, and really countless others before them. The idea is to provide a temporary 'trace' mode to Bandit which watches for exceptions (or user triggers) and when such a condition triggers, a dump of all relevant telemetry events is made. The hope is that this should help provide some insight into the causes of such issues, since the telemetry events contain a record of all bytes read/written, along with a bunch of other useful internal states (such as what the Conn & Bandit adapters looked like at each step of the way).

I'm planning on also adding some more untimed Bandit telemetry events at various places in the stacks (reading/writing of HTTP/2 frames, for example) to further enrich these dumps.

I'm not 100% sure that this approach will bear fruit, but there's no better way to try it out than in the real world. @atavistock, would you be able to take a look at the tooling on this branch and see if you'd be able to make use of it in the cases where #438 is happening? You can find useful docs at the top of the Bandit.Trace module in this PR.

@mtrudel mtrudel force-pushed the trace_tooling branch 2 times, most recently from dc0b2f9 to 27c4b5c Compare January 10, 2025 22:31
@mtrudel mtrudel merged commit 5adc828 into main Jan 25, 2025
25 of 26 checks passed
@mtrudel mtrudel deleted the trace_tooling branch January 25, 2025 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant