René's URL Explorer Experiment


Title: Report a batch Better Stack rejected instead of dropping it silently by PetrHeinz · Pull Request #64 · logtail/logtail-python · GitHub

Open Graph Title: Report a batch Better Stack rejected instead of dropping it silently by PetrHeinz · Pull Request #64 · logtail/logtail-python

X Title: Report a batch Better Stack rejected instead of dropping it silently by PetrHeinz · Pull Request #64 · logtail/logtail-python

Description: LogtailHandler retries a batch that Better Stack answers with a 5xx (or that hits a network error) and prints Failed to send logs to Better Stack after 3 retries: ... when the retries run out. A batch answered with any other non-2xx status is rightly not retried, but it is also dropped without a word: nothing is printed, nothing is raised and dropcount stays the same. An app with a wrong or revoked source token (401), or one sending a payload that is too large (413) or malformed (400, 422), gets no sign that none of its logs arrive. With this change the flush worker reports such a batch through the same print() as the 5xx path: Better Stack rejected 12 log records with HTTP 401 Unauthorized: {"errors":"Invalid source token"}. Further rejections with this status won't be reported. The line names the number of records dropped, the HTTP status with its reason phrase, and the start of the response body (its first 200 characters on one line) when there is one. It is printed once per HTTP status per flush worker. A batch is flushed every second, so a line per rejected batch would flood the output of a misconfigured app; a different status is reported again. The retry policy and what counts as retryable stay as they are, and there is no new handler option. The first commit adds only the tests and is expected to fail CI. 🤖 Generated with Claude Code

Open Graph Description: LogtailHandler retries a batch that Better Stack answers with a 5xx (or that hits a network error) and prints Failed to send logs to Better Stack after 3 retries: ... when the retries run out. A ba...

X Description: LogtailHandler retries a batch that Better Stack answers with a 5xx (or that hits a network error) and prints Failed to send logs to Better Stack after 3 retries: ... when the retries run out. A ba...

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

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:a5153a09-2f5b-3a8a-df18-d276ac2d7bd9
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA604:6188:144CCC:1B0108:6AFBB07C
html-safe-noncee50bad287886f81f29ceb46c2ac31e22e3b638f88a8abc144918b363af00e197
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNjA0OjYxODg6MTQ0Q0NDOjFCMDEwODo2QUZCQjA3QyIsInZpc2l0b3JfaWQiOiIyMzE4ODY0MTgzNjE4OTQxMDUzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac12314a6a080769d792dbf17b0a73b86fe4d3c0fa4fbcfee836a494f424bfbbb0
hovercard-subject-tagpull_request:5177187601
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/64/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:altLogtailHandler retries a batch that Better Stack answers with a 5xx (or that hits a network error) and prints Failed to send logs to Better Stack after 3 retries: ... when the retries run out. A ba...
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/64/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Flogtail%2Flogtail-python%2Fpull%2F64%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%2F64%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/64/files
Reloadhttps://github.com/logtail/logtail-python/pull/64/files
Reloadhttps://github.com/logtail/logtail-python/pull/64/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/report-rejected-batchhttps://github.com/logtail/logtail-python/tree/claude/report-rejected-batch
Conversation 0 https://github.com/logtail/logtail-python/pull/64
Commits 2 https://github.com/logtail/logtail-python/pull/64/commits
Checks 20 https://github.com/logtail/logtail-python/pull/64/checks
Files changed https://github.com/logtail/logtail-python/pull/64/files
Please reload this pagehttps://github.com/logtail/logtail-python/pull/64/files
Report a batch Better Stack rejected instead of dropping it silently https://github.com/logtail/logtail-python/pull/64/files#top
Show all changes 2 commits https://github.com/logtail/logtail-python/pull/64/files
b9810b2 Add failing tests: a batch Better Stack rejects is reported once per … PetrHeinz Nov 5, 2026 https://github.com/logtail/logtail-python/pull/64/commits/b9810b25cf6b8627022b1eea3b41092de18cd31c
84423da Report a batch Better Stack rejected instead of dropping it silently PetrHeinz Nov 5, 2026 https://github.com/logtail/logtail-python/pull/64/commits/84423da515fdb750b34763ba8927ca03c63b4961
Clear filters https://github.com/logtail/logtail-python/pull/64/files
Please reload this pagehttps://github.com/logtail/logtail-python/pull/64/files
Please reload this pagehttps://github.com/logtail/logtail-python/pull/64/files
flusher.py https://github.com/logtail/logtail-python/pull/64/files#diff-8a07bff24d8cc7c814a976f4c2db795ba1fff25f57eb18f3dd5203c2e77ef533
test_flusher.py https://github.com/logtail/logtail-python/pull/64/files#diff-f17c869b31f30e711632530bb52ff81b91a288179d365ff7776c8a7cb24c6db9
logtail/flusher.pyhttps://github.com/logtail/logtail-python/pull/64/files#diff-8a07bff24d8cc7c814a976f4c2db795ba1fff25f57eb18f3dd5203c2e77ef533
View file https://github.com/logtail/logtail-python/blob/84423da515fdb750b34763ba8927ca03c63b4961/logtail/flusher.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/logtail/logtail-python/pull/64/{{ revealButtonHref }}
https://github.com/logtail/logtail-python/pull/64/files#diff-8a07bff24d8cc7c814a976f4c2db795ba1fff25f57eb18f3dd5203c2e77ef533
https://github.com/logtail/logtail-python/pull/64/files#diff-8a07bff24d8cc7c814a976f4c2db795ba1fff25f57eb18f3dd5203c2e77ef533
https://github.com/logtail/logtail-python/pull/64/files#diff-8a07bff24d8cc7c814a976f4c2db795ba1fff25f57eb18f3dd5203c2e77ef533
https://github.com/logtail/logtail-python/pull/64/files#diff-8a07bff24d8cc7c814a976f4c2db795ba1fff25f57eb18f3dd5203c2e77ef533
tests/test_flusher.pyhttps://github.com/logtail/logtail-python/pull/64/files#diff-f17c869b31f30e711632530bb52ff81b91a288179d365ff7776c8a7cb24c6db9
View file https://github.com/logtail/logtail-python/blob/84423da515fdb750b34763ba8927ca03c63b4961/tests/test_flusher.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/logtail/logtail-python/pull/64/{{ revealButtonHref }}
https://github.com/logtail/logtail-python/pull/64/files#diff-f17c869b31f30e711632530bb52ff81b91a288179d365ff7776c8a7cb24c6db9
https://github.com/logtail/logtail-python/pull/64/files#diff-f17c869b31f30e711632530bb52ff81b91a288179d365ff7776c8a7cb24c6db9
https://github.com/logtail/logtail-python/pull/64/files#diff-f17c869b31f30e711632530bb52ff81b91a288179d365ff7776c8a7cb24c6db9
https://github.com/logtail/logtail-python/pull/64/files#diff-f17c869b31f30e711632530bb52ff81b91a288179d365ff7776c8a7cb24c6db9
Please reload this pagehttps://github.com/logtail/logtail-python/pull/64/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.