Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Telescope Laravel Package

laravel/telescope

Laravel Telescope is a debug assistant for Laravel that provides a rich dashboard of requests, exceptions, logs, database queries, queued jobs, mail, notifications, cache activity, scheduled tasks, and more—ideal for local development and troubleshooting.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture Fit

Laravel Telescope is a first-class debugging tool designed specifically for Laravel applications, making it an excellent architectural fit for any Laravel-based system. Its deep integration with Laravel’s core components (requests, exceptions, queries, jobs, logs, etc.) ensures minimal friction in adoption. The package leverages Laravel’s service provider pattern, middleware, and event listeners to intercept and log application activity without requiring invasive modifications to existing code.

Key architectural strengths:

  • Modular design: Telescope operates as a standalone package with minimal coupling to business logic.
  • Event-driven: Uses Laravel’s event system (e.g., illuminate.query, illuminate.auth.attempting) to capture telemetry.
  • Database-agnostic: Works with Eloquent, Query Builder, and raw SQL (via DB::listen).
  • Extensible: Supports custom watchers (e.g., for third-party services) via the Telescope\Watchers interface.

Integration Feasibility

Integration is highly feasible with low technical debt for Laravel applications. The package provides:

  • Zero-configuration setup for basic usage (e.g., composer require laravel/telescope + middleware registration).
  • Optional configuration for fine-tuning (e.g., ignoring specific routes, throttling entries, or customizing storage).
  • Database migration: Includes a telescope_entries table, which can be published and customized.
  • Asset compilation: Uses Vite (since v5.10.0) for modern frontend assets, reducing build complexity.

Potential integration challenges:

  • Performance overhead: Telescope logs all requests, queries, and jobs by default. In high-traffic environments, this may require throttling (configurable via entries_per_minute).
  • Storage bloat: The telescope_entries table can grow large. Solutions include:
    • Pruning old entries via telescope:prune Artisan command.
    • Using a separate database or disk-based storage (via Telescope\Storage\Storage interface).
  • Authentication: Telescope requires authentication (e.g., Laravel’s auth middleware) to access its dashboard, which may need alignment with existing auth systems (e.g., Sanctum, Passport).

Technical Risk

Risk Area Severity Mitigation
Database performance Medium Configure entries_per_minute and prune regularly. Use indexing on created_at.
Asset compilation issues Low Ensure Vite/Laravel Mix is properly configured (Telescope v5+ uses Vite by default).
Middleware conflicts Low Telescope’s middleware runs late in the stack; conflicts are rare but testable.
PHP version compatibility Low Telescope supports PHP 8.1–8.5 (as of v5.15.1). Verify compatibility with your stack.
Third-party watchers Medium Custom watchers may require testing for edge cases (e.g., async jobs).
Security Medium Ensure Telescope routes are protected (e.g., telescope middleware) and not exposed in production.

Key Questions for the TPM

  1. Production Usage:

    • Will Telescope be used in production? If so, how will data retention/purging be managed to avoid storage bloat?
    • Are there compliance requirements (e.g., GDPR) that restrict logging sensitive data? If yes, how will Telescope’s data be sanitized?
  2. Performance Impact:

    • What is the expected request volume? For high-traffic apps, consider throttling or sampling entries.
    • Will Telescope run alongside Laravel Horizon or Reverb? If so, how will job/queue telemetry overlap be managed?
  3. Customization Needs:

    • Are there specific data points missing from Telescope’s default tracking (e.g., custom events, external API calls)?
    • Will custom watchers be required to extend functionality (e.g., tracking third-party services)?
  4. CI/CD and Testing:

    • How will Telescope be tested in CI? The package includes tests, but integration tests may need to mock its database.
    • Will Telescope be disabled in CI to avoid noise? If so, how will this be configured?
  5. Authentication:

    • How will Telescope’s dashboard be authenticated? Will it use Laravel’s built-in auth or a dedicated system (e.g., API tokens)?
    • Should Telescope support role-based access (e.g., developers vs. admins)?
  6. Alternatives:

    • Have other debugging tools (e.g., Laravel Debugbar, Sentry, Ray) been considered? How does Telescope compare in terms of depth of insights vs. overhead?

Integration Approach

Stack Fit

Telescope is optimized for Laravel ecosystems and integrates seamlessly with:

  • Laravel Framework: Core components (requests, queries, jobs, events).
  • Laravel Ecosystem:
    • Horizon/Reverb: Queue job telemetry.
    • Mail/Notifications: Email and notification tracking.
    • Cache: Cache operation logging.
    • Vite/Webpack: Asset compilation (Telescope v5+ uses Vite).
  • Database: Eloquent, Query Builder, and raw SQL (via DB::listen).
  • Authentication: Laravel’s auth system (Sanctum, Passport, or session-based).

Non-Laravel Compatibility:

  • Not suitable for non-Laravel PHP apps (e.g., Symfony, Lumen) without significant refactoring.
  • Frontend frameworks: Telescope’s UI is Laravel Blade-based; custom integrations (e.g., React/Vue) would require proxying data via APIs.

Migration Path

Step Action Dependencies
1. Installation composer require laravel/telescope Composer, Laravel ≥9.x
2. Publish Assets php artisan telescope:install Node.js (for Vite), Laravel Mix
3. Configure Auth Register TelescopeServiceProvider and middleware in app.php. Laravel auth system
4. Database Setup Run php artisan migrate (publishes telescope_entries table). Database connection
5. Customization Configure config/telescope.php (e.g., throttling, ignored routes). Application-specific needs
6. Testing Verify telemetry in /telescope dashboard. Test environment
7. Production Disable in production (or use TELESCOPE_ENABLED=false env var). Deployment strategy

Rollout Strategy:

  • Development: Enable by default for all developers.
  • Staging: Enable with throttling (e.g., entries_per_minute=50).
  • Production: Disable unless explicitly needed for debugging (use feature flags or env vars).

Compatibility

Component Compatibility Notes
Laravel Version 9.x–13.x (as of v5.20.0) Tested with latest LTS versions.
PHP Version 8.1–8.5 PHP 8.0 support dropped in v5.15.1.
Database MySQL, PostgreSQL, SQLite, SQL Server Uses Eloquent; no raw PDO dependencies.
Queue Systems Database, Redis, SQS, etc. (via Laravel Queues) Supports Horizon/Reverb telemetry.
Frontend Build Tools Vite (default), Webpack (legacy) Telescope v5+ uses Vite; older versions use Webpack.
Authentication Laravel’s auth (session, Sanctum, Passport) Customizable via middleware.
Third-Party Packages Most Laravel packages (e.g., Spatie, Cashier) May require custom watchers for full telemetry.

Sequencing

  1. Pre-Integration:

    • Audit existing logging (e.g., Monolog) to avoid duplication.
    • Decide on data retention (e.g., prune old entries via cron).
    • Plan for authentication (e.g., restrict /telescope to developers role).
  2. Integration Phase:

    • Install and configure in development first.
    • Test with real user flows to validate telemetry coverage.
    • Implement custom watchers if needed (e.g., for Stripe, Algolia).
  3. Post-Integration:

    • Document **how to access Teles
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope
anil/file-picker
broqit/fields-ai