mirror of
https://github.com/Glitchy-Sheep/boosty-downloader.git
synced 2026-10-14 21:33:23 +00:00
[PR #144] [MERGED] [debug-log] Log request outcomes, connection phases and retry attempts #149
Labels
No labels
api-drift
bug
ci
documentation
enhancement
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Glitchy-Sheep/boosty-downloader#149
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Glitchy-Sheep/boosty-downloader/pull/144
Author: @Glitchy-Sheep
Created: 8/15/2026
Status: ✅ Merged
Merged: 8/15/2026
Merged by: @Glitchy-Sheep
Base:
main← Head:feat/debug-log-network-phases📝 Commits (3)
4e57564feat: Log request outcomes and connection phases in the debug log9140dd7feat: Show retry attempt numbers in the debug logc82f6d1docs: Note the debug log request tracing in the changelog📊 Changes
6 files changed (+341 additions, -16 deletions)
View changed files
📝
CHANGELOG.md(+4 -0)📝
boosty_downloader/src/application/di/app_environment.py(+5 -1)📝
boosty_downloader/src/infrastructure/loggers/request_tracing.py(+178 -10)📝
ruff.toml(+2 -1)📝
test/unit/external_videos_downloader/title_limit_test.py(+3 -3)📝
test/unit/loggers/request_tracing_test.py(+149 -1)📄 Description
Summary
The debug log used to record only that a request started. A hang or a killed connection left the log silent - diagnosing the recent network incident took manual raw requests. Now every request logs its outcome, its connection phases and its retry attempt number: the log answers "what happened and where it got stuck" by itself.
Problem
Fix
#N) tying its lines together, an outcome line with status and timing (-> 200 in 0.31s) or the error chain (-> FAIL ClientConnectorError <- ConnectionResetError in 12.1s), and phase timings (dns 0.123s, conn 1.043s; pooled connections sayconn reused)connecting...line marks the connection phase: while a connect hangs, it stays the last line of the logconn 12.0son the failed attempt(attempt 2/5); the budget comes from DI, requests outside the retry client get no markBefore / After
Before: a killed TLS handshake looks like nothing: the same GET line repeats every ~13 seconds, the log never says why.
After:
Verification
--debug checkagainst the real API: start line with(attempt 1/5), liveconnecting..., outcome-> 200 in 1.64s (dns 0.123s, conn 1.043s)- taken from the actual log filetask cigreen: checks, 107 unit tests, 6 live integration tests, build🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.