- What does the drcantagalo/laravel-monitor package actually do?
- Laravel Monitor is a lightweight observability package that records incoming requests, exceptions, slow queries and background job activity. It then surfaces that data in a dashboard so you get real-time visibility into your application's health and performance. The goal is to spot bottlenecks and failures in development and production before users report them.
- How do I install laravel-monitor in a Laravel application?
- Install it with Composer by running composer require drcantagalo/laravel-monitor from your project root. Laravel's package auto-discovery should register the service provider, after which you publish the package configuration and any database assets it ships so monitoring data has somewhere to live. The package is designed for minimal setup, so the defaults are usually enough for a first run before you tune thresholds.
- Which Laravel and PHP versions does laravel-monitor support?
- The package is built to feel native to Laravel and targets modern Laravel releases, but the exact version constraints are declared in its composer.json. Check the require block in the repository before installing so you avoid a dependency conflict with your application. If you are on an older Laravel major version, confirm compatibility or look for a tagged release that matches.
- Does laravel-monitor slow down my application in production?
- It is described as a lightweight package whose job is to record request duration, status codes and memory usage rather than replace a full profiling stack. Any in-request instrumentation carries some cost, so install it in staging first and compare response times against a baseline. After that you can keep thresholds and captured data lean for production.
- How does laravel-monitor capture exceptions with request context?
- It hooks into Laravel's exception handling and stores thrown exceptions together with useful request context, so you can see which route or request triggered the failure. That context is what makes a recorded exception actionable instead of a bare stack trace. Reviewing these entries in the dashboard helps you catch recurring errors before users report them.
- Can laravel-monitor detect slow queries and slow background jobs?
- Yes, slow operations are part of its core scope: it tracks slow database queries and background job activity alongside requests and exceptions. You configure thresholds so only operations that exceed your limits are flagged. That keeps the signal focused on the bottlenecks that actually matter to your application.
- How do I configure thresholds and alerts for critical issues?
- Thresholds live in the package configuration file you publish during installation, where you set limits for slow requests, slow queries and slow jobs. Critical issues can then trigger alerts so you hear about failures before your users do. Tune the values after a few days of real traffic instead of guessing on day one.
- Where do I view the monitoring dashboard?
- Recorded requests, exceptions and slow operations are surfaced in the package dashboard, which is the main monitoring workflow. You reach it through a route registered in your application and review recent activity there. In production you should restrict access to it, typically behind authentication or an internal-only route.
- How can I verify laravel-monitor is recording data before deploying?
- Install it locally or in staging, load a few routes, and confirm requests appear with their duration, status code and memory usage. Trigger a deliberate exception and a slow query to check that both are captured with request context. Once the data looks correct, promote the same configuration to production.
- How does laravel-monitor compare with Laravel Telescope or Sentry?
- Telescope is a debugging assistant aimed primarily at local development, while Laravel Monitor is framed around production health with thresholds and alerts. Sentry is a broader error-tracking service with ecosystem-wide coverage, whereas this package keeps requests, exceptions and slow operations in one Laravel-native dashboard. The tools can coexist, but laravel-monitor positions itself as the lightweight option you can leave running in production.