webrek/laravel-telescope-mongodb
Drop-in MongoDB storage driver for Laravel Telescope. Run Telescope without MySQL/PostgreSQL: install via artisan, publishes assets, removes SQL migrations, creates required MongoDB indexes, and binds the repository. Includes command to migrate existing SQL Telescope data.
phpunit/phpunit ^10.5 || ^11.0 || ^12.0).^11.0 constraint stays in composer.json for consumers who
disable advisory blocking.IndexManager, a single source of truth for every index definition, shared
by the sync-indexes command and the repository so the two cannot drift.indexes.auto_create is enabled the repository
ensures all indexes (including the TTL index) on the first write of each
process, so a fresh deploy is self-healing without running sync-indexes.
The check runs once per process, is guarded, and swallows failures so index
maintenance can never break a Telescope write.install and doctor now warn when indexes.ttl_seconds is null, and
sync-indexes reports the disabled state, so a switched-off prune is no
longer silent.sync-indexes could not turn TTL back off.auto_create and ttl_seconds, and clarifies that
config('telescope.driver') is irrelevant once the driver is bound.indexes.auto_create was read by nothing: indexes existed only after a
manual sync-indexes, so deployments relying on the documented default
silently had no indexes and no automatic pruning.Victor Hernandez <victor@arturohernandez.com.mx> (the canonical
contact for this project). composer.json author block updated and
the historical commits / annotated tags were rewritten via
git filter-repo so every reference is consistent.ext-mongodb and mongodb/mongodb bumped from
^1.18 to ^1.21 to match what mongodb/laravel-mongodb 5.x
actually requires. Previous declared minimums would have failed
resolution under composer install --prefer-lowest (the constraint
was effectively dead weight — Composer was always converging to 1.21+
through the transitive Laravel package).docker-compose.yml ships
mysql:8 and laravel-mysql services behind a bench profile,
scripts/bootstrap-playground-mysql.sh stands up a stock-Telescope
control group, and scripts/bench.sh runs identical traffic against
both backends and reports throughput plus p50/p95/p99.make bench-setup, make bench, make bench-down targets so the
benchmark is one command end to end.update() now uses a single findOneAndUpdate per change with dot-
notation content.<field> updates instead of findOne + updateOne.
Halves the round-trips per terminate callback (jobs, scheduled tasks,
exceptions in the after-commit flow).storeExceptions() issues a single bulkWrite per batch, replacing
the previous per-exception sequence of countDocuments, updateMany
and insertOne. Existing occurrence counts are now fetched in one
aggregation across all family hashes in the batch.dij-digital/telescope-mongodb,
farmani/telescope-mongodb and yektadg/laravel-telescope-mongodb
forks (all of which re-vendor Telescope itself).composer.json metadata: keyword list now mirrors the
GitHub topics, plus a support block (issues / source / security),
homepage, authors, and Composer scripts so contributors can run
composer test, composer stan, composer pint without going
through the Makefile.EntriesRepository,
ClearableRepository, PrunableRepository and TerminableRepository
contracts on top of mongodb/laravel-mongodb.ObjectId as the
monotonic sequence cursor, and chunked store / prune operations.telescope-mongodb:install artisan command that publishes the package
config, runs telescope:install, removes the relational migration
Telescope ships (the SQL tables this driver does not need), and creates
every required MongoDB index.telescope-mongodb:sync-indexes artisan command to (re)create the seven
collection indexes; supports --drop for a clean rebuild.telescope-mongodb:doctor artisan command for diagnostics (connection
check, index parity, server version, entry counts).telescope-mongodb:migrate-from-sql artisan command to migrate an
existing Telescope SQL deployment into MongoDB without data loss.created_at via indexes.ttl_seconds config so
MongoDB can auto-purge expired entries without a cron-driven prune.write_concern config block) for tuning
durability vs. latency on bulk inserts.Dockerfile, docker-compose.yml)
with PHP 8.3 + ext-mongodb, Composer, and a mongo:7 service.Makefile with targets for the test suite (make test), a full Laravel
playground (make playground), formatting (make pint), and static
analysis (make stan).scripts/bootstrap-playground.sh that creates a real Laravel app under
playground/, wires this package via a Composer path repository, and
installs Telescope so the integration can be smoke-tested in seconds.How can I help you explore Laravel packages today?