René's URL Explorer Experiment


Title: T-4705 Do not ship log records emitted by the flush worker itself by PetrHeinz · Pull Request #46 · logtail/logtail-python · GitHub

Open Graph Title: T-4705 Do not ship log records emitted by the flush worker itself by PetrHeinz · Pull Request #46 · logtail/logtail-python

X Title: T-4705 Do not ship log records emitted by the flush worker itself by PetrHeinz · Pull Request #46 · logtail/logtail-python

Description: The Django setup in the docs puts the handler on the root logger. With that logger at DEBUG, every upload feeds the handler again: urllib3 logs each request it makes at DEBUG, that record lands in the handler's queue, the next flush uploads it, urllib3 logs that request as well, and so on. Reproduced against master with a local endpoint: a single logger.info() produced 9 uploads in 2 seconds, and the process never exited, because the worker drains the queue at shutdown and every drain refills it. In practice manage.py commands and the runserver reloader hang, while the same handler on an app logger works, since urllib3's records never reach it. The first commit adds a test that attaches the handler to a logger the uploader itself logs to and expects flush() to return; it is expected to fail CI. The second commit made emit() drop records logged from a flush worker thread altogether. The third commit replaces that with shipping them opportunistically: records logged from a flush worker are queued as TransportFrames, a marker subclass of dict that msgpack packs unchanged a batch is uploaded only if it contains at least one regular record; a batch made solely of transport frames is discarded, since uploading it would just log again the worker's own put never blocks, so it cannot wedge on its own full queue with drop_extra_events=False So during runtime urllib3's two lines about an upload ride along with the next batch, while at flush() or exit, where a drain necessarily ends on a transport-only batch, they are dropped. Records from application threads are unaffected. 🤖 Generated with Claude Code

Open Graph Description: The Django setup in the docs puts the handler on the root logger. With that logger at DEBUG, every upload feeds the handler again: urllib3 logs each request it makes at DEBUG, that record lands in ...

X Description: The Django setup in the docs puts the handler on the root logger. With that logger at DEBUG, every upload feeds the handler again: urllib3 logs each request it makes at DEBUG, that record lands in ...

Opengraph URL: https://github.com/logtail/logtail-python/pull/46

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:8c0e53ba-e1aa-e94a-0d7f-697293e7e828
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id92F2:10A7CF:17B8D9:1F64C6:6AFBB10F
html-safe-nonce88c925cbd81cad391b41799c1e7d4a2dc78174a4ae3281db0c31f25d8229bbbd
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MkYyOjEwQTdDRjoxN0I4RDk6MUY2NEM2OjZBRkJCMTBGIiwidmlzaXRvcl9pZCI6IjE3OTAyMzQ5MTg3MjI5NzM5NjciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac7fd10f285d526ca2b30817ae7c0f1fef201ef7b73dd6f0d9c2ef07143eaee4f6
hovercard-subject-tagpull_request:4614818536
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/logtail/logtail-python/pull/46/files
twitter:imagehttps://avatars.githubusercontent.com/u/10008612?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/10008612?s=400&v=4
og:image:altThe Django setup in the docs puts the handler on the root logger. With that logger at DEBUG, every upload feeds the handler again: urllib3 logs each request it makes at DEBUG, that record lands in ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonee25fbd830d3e6ad0e8935c105cf4fdc70c593dffcd27bb45b790ae4fece5ea55
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/logtail/logtail-python git https://github.com/logtail/logtail-python.git
octolytics-dimension-user_id78922349
octolytics-dimension-user_loginlogtail
octolytics-dimension-repository_id351343852
octolytics-dimension-repository_nwologtail/logtail-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id351343852
octolytics-dimension-repository_network_root_nwologtail/logtail-python
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release08c8f17f9d27054a108b8b6254e405de0151f660
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/logtail/logtail-python/pull/46/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Flogtail%2Flogtail-python%2Fpull%2F46%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Flogtail%2Flogtail-python%2Fpull%2F46%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=logtail%2Flogtail-python
Reloadhttps://github.com/logtail/logtail-python/pull/46/files
Reloadhttps://github.com/logtail/logtail-python/pull/46/files
Reloadhttps://github.com/logtail/logtail-python/pull/46/files
logtailhttps://github.com/logtail
logtail-pythonhttps://github.com/logtail/logtail-python
Codehttps://github.com/logtail/logtail-python
Issues1 (1)https://github.com/logtail/logtail-python/issues
Pull requestshttps://github.com/logtail/logtail-python/pulls
Actionshttps://github.com/logtail/logtail-python/actions
Security and qualityhttps://github.com/logtail/logtail-python/security
Insightshttps://github.com/logtail/logtail-python/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Flogtail%2Flogtail-python%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Flogtail%2Flogtail-python%2Fissues%2Fnew%2Fchoose
PetrHeinzhttps://github.com/PetrHeinz
masterhttps://github.com/logtail/logtail-python/tree/master
claude/t-4705-flusher-log-feedback-loophttps://github.com/logtail/logtail-python/tree/claude/t-4705-flusher-log-feedback-loop
Conversation 0 https://github.com/logtail/logtail-python/pull/46
Commits 3 https://github.com/logtail/logtail-python/pull/46/commits
Checks 14 https://github.com/logtail/logtail-python/pull/46/checks
Files changed https://github.com/logtail/logtail-python/pull/46/files
Please reload this pagehttps://github.com/logtail/logtail-python/pull/46/files
T-4705 Do not ship log records emitted by the flush worker itself https://github.com/logtail/logtail-python/pull/46/files#top
Show all changes 3 commits https://github.com/logtail/logtail-python/pull/46/files
00a5c86 T-4705 Add failing test for the handler feeding itself with the uploa… PetrHeinz Sep 23, 2026 https://github.com/logtail/logtail-python/pull/46/commits/00a5c86a23973ae3b25d4105ee34cd85d93bede7
9da965f T-4705 Ignore log records emitted by the flush worker itself PetrHeinz Sep 23, 2026 https://github.com/logtail/logtail-python/pull/46/commits/9da965f5e31dfa1039e2be115431989688855136
acd4550 T-4705 Ship the flush worker's own records with the next batch instea… PetrHeinz Sep 24, 2026 https://github.com/logtail/logtail-python/pull/46/commits/acd455021f19863cb77c70b8b215e96db7a9ea2e
Clear filters https://github.com/logtail/logtail-python/pull/46/files
Please reload this pagehttps://github.com/logtail/logtail-python/pull/46/files
Please reload this pagehttps://github.com/logtail/logtail-python/pull/46/files
flusher.py https://github.com/logtail/logtail-python/pull/46/files#diff-8a07bff24d8cc7c814a976f4c2db795ba1fff25f57eb18f3dd5203c2e77ef533
handler.py https://github.com/logtail/logtail-python/pull/46/files#diff-a9b0950e5b1ec28ff945c773b108d8b4b6617bfdbee33319a137ec929317e2cd
test_handler.py https://github.com/logtail/logtail-python/pull/46/files#diff-3f86b181ab338949acfc1d27ff975b666acd3f0b016eb4bcce7c79fab09e463b
logtail/flusher.pyhttps://github.com/logtail/logtail-python/pull/46/files#diff-8a07bff24d8cc7c814a976f4c2db795ba1fff25f57eb18f3dd5203c2e77ef533
View file https://github.com/logtail/logtail-python/blob/acd455021f19863cb77c70b8b215e96db7a9ea2e/logtail/flusher.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/logtail/logtail-python/pull/46/{{ revealButtonHref }}
https://github.com/logtail/logtail-python/pull/46/files#diff-8a07bff24d8cc7c814a976f4c2db795ba1fff25f57eb18f3dd5203c2e77ef533
https://github.com/logtail/logtail-python/pull/46/files#diff-8a07bff24d8cc7c814a976f4c2db795ba1fff25f57eb18f3dd5203c2e77ef533
https://github.com/logtail/logtail-python/pull/46/files#diff-8a07bff24d8cc7c814a976f4c2db795ba1fff25f57eb18f3dd5203c2e77ef533
https://github.com/logtail/logtail-python/pull/46/files#diff-8a07bff24d8cc7c814a976f4c2db795ba1fff25f57eb18f3dd5203c2e77ef533
https://github.com/logtail/logtail-python/pull/46/files#diff-8a07bff24d8cc7c814a976f4c2db795ba1fff25f57eb18f3dd5203c2e77ef533
logtail/handler.pyhttps://github.com/logtail/logtail-python/pull/46/files#diff-a9b0950e5b1ec28ff945c773b108d8b4b6617bfdbee33319a137ec929317e2cd
View file https://github.com/logtail/logtail-python/blob/acd455021f19863cb77c70b8b215e96db7a9ea2e/logtail/handler.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/logtail/logtail-python/pull/46/{{ revealButtonHref }}
https://github.com/logtail/logtail-python/pull/46/files#diff-a9b0950e5b1ec28ff945c773b108d8b4b6617bfdbee33319a137ec929317e2cd
https://github.com/logtail/logtail-python/pull/46/files#diff-a9b0950e5b1ec28ff945c773b108d8b4b6617bfdbee33319a137ec929317e2cd
https://github.com/logtail/logtail-python/pull/46/files#diff-a9b0950e5b1ec28ff945c773b108d8b4b6617bfdbee33319a137ec929317e2cd
https://github.com/logtail/logtail-python/pull/46/files#diff-a9b0950e5b1ec28ff945c773b108d8b4b6617bfdbee33319a137ec929317e2cd
tests/test_handler.pyhttps://github.com/logtail/logtail-python/pull/46/files#diff-3f86b181ab338949acfc1d27ff975b666acd3f0b016eb4bcce7c79fab09e463b
View file https://github.com/logtail/logtail-python/blob/acd455021f19863cb77c70b8b215e96db7a9ea2e/tests/test_handler.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/logtail/logtail-python/pull/46/{{ revealButtonHref }}
https://github.com/logtail/logtail-python/pull/46/files#diff-3f86b181ab338949acfc1d27ff975b666acd3f0b016eb4bcce7c79fab09e463b
Please reload this pagehttps://github.com/logtail/logtail-python/pull/46/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.