Skip to content

Never let the analytics ledger crash the boot - #5

Merged
pip-install-python merged 1 commit into
mainfrom
retire-pip-install-python-domain
Aug 2, 2026
Merged

Never let the analytics ledger crash the boot#5
pip-install-python merged 1 commit into
mainfrom
retire-pip-install-python-domain

Conversation

@pip-install-python

Copy link
Copy Markdown
Owner

TRAFFIC_ANALYTICS_FILE pointed at /var/data/visitor_analytics.json before the Render disk was attached; AnalyticsTracker's import-time construction raised FileNotFoundError, every uvicorn worker died before binding a port, and Render looped the deploy while the old build kept serving.

The tracker now creates missing parent directories (the empty-disk first boot), and a genuinely unwritable path disables tracking with a loud log line instead of raising — analytics is an accessory, serving the site is the product. tests/test_analytics_boot.py pins both behaviours.

TRAFFIC_ANALYTICS_FILE pointed at /var/data/visitor_analytics.json before
the Render disk was attached; AnalyticsTracker's import-time construction
raised FileNotFoundError, every uvicorn worker died before binding a port,
and Render looped the deploy while the old build kept serving.

The tracker now creates missing parent directories (the empty-disk first
boot), and a genuinely unwritable path disables tracking with a loud log
line instead of raising — analytics is an accessory, serving the site is
the product. tests/test_analytics_boot.py pins both behaviours.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@pip-install-python
pip-install-python merged commit 13e2e8a into main Aug 2, 2026
6 checks passed
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