Why this migration exists
Telescope is a world-class Laravel debugger. Teams install it for local dev, it works beautifully, and some of them leave it on in production because no one stops them. That's where the problems start:
- Synchronous DB writes on every request add 10-50ms
- Storage bloats fast — millions of
telescope_entriesrows/day - No aggregation, no alerts, no team triage workflow
- Often exposed publicly because /telescope lacks auth by default
NightOwl replaces Telescope's production role. Keep Telescope where it shines — in dev.
Step 1 — install NightOwl
composer require nightowl/agent
php artisan nightowl:installStep 2 — disable Telescope in production only
In production .env
TELESCOPE_ENABLED=falseOr condition the service provider registration on environment:
bootstrap/providers.php
return [
App\Providers\AppServiceProvider::class,
// Only load Telescope locally
...(app()->environment('local', 'staging') ? [
App\Providers\TelescopeServiceProvider::class,
] : []),
];Step 3 — verify Telescope is off in production
# On a production server:
php artisan route:list | grep telescope
# Should return empty if Telescope is properly disabled.
# Double-check the /telescope route is inaccessible:
curl -I https://yourapp.com/telescope
# Should return 404.Step 4 — drop Telescope's tables (optional)
Once you're certain nothing queries the Telescope tables in production:
-- Back up first if you want the historical archive
\copy telescope_entries TO '/tmp/telescope_entries.csv' WITH CSV;
-- Then drop
DROP TABLE telescope_entries_tags;
DROP TABLE telescope_entries;
DROP TABLE telescope_monitoring;Frees storage and removes the background burden of Telescope's prune job.
Keep using Telescope in dev
Your local .env keeps TELESCOPE_ENABLED=true. The per-request inspector at /telescope stays available locally and in staging. Telescope is unmatched for this use case — there's no reason to remove it.
What each tool owns now
| Environment | Use | Why |
|---|---|---|
| Local dev | Telescope | Unmatched per-request inspector |
| Staging | Both | Telescope for debugging, NightOwl for pre-prod validation |
| Production | NightOwl | Async, aggregated, alerted, BYOD Postgres |
AFTER MIGRATION
The right tool for each stage
Telescope for the detail view locally. NightOwl for aggregation, alerts, and production-safe telemetry. Each excellent at its role.