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
Laravel Requests Monitor

Laravel Requests Monitor Laravel Package

chrishenrique/laravel-requests-monitor

Lightweight Laravel package to monitor, log, and analyze HTTP requests and custom app actions. Supports middleware auto-tracking, manual event registration, dedicated DB connection, configurable retention/pruning, and works with Laravel 7+ (PHP 7.4/8+).

View on GitHub
Deep Wiki
Context7

Requests monitor register

Frequently asked questions about Laravel Requests Monitor
How do I automatically log all incoming HTTP requests in Laravel without manually tracking each endpoint?
Use the built-in middleware by registering `RequestMonitorMiddleware` in your Laravel middleware group (e.g., `web`). The package automatically captures request details like URLs, IP addresses, and execution time without requiring manual intervention per route.
Can I log custom business events (e.g., user sign-ups, payments) alongside HTTP requests?
Yes. The package supports manual action registration via `RequestsMonitor::logAction()`. Pass metadata like event type, user ID, or payload to track non-HTTP activities alongside requests. This is useful for auditing or analytics.
Does this package work with Laravel 8/9/10, or is it limited to older versions?
It officially supports Laravel 7+ and PHP 7.4/8+. While tested on modern versions, always verify compatibility with your Laravel release by checking the package’s changelog or testing in a staging environment before upgrading.
How do I configure the package to use a separate database for request logs to avoid bloating my main app database?
Create a dedicated database connection named `requests-monitor` in `config/database.php` and update the package config. The package will use this connection by default, isolating logs from your primary app data.
What happens if I don’t run the migrations after installing the package?
The package won’t store logs in the database. Run `php artisan vendor:publish --tag=requests-monitor-migrations` followed by `php artisan migrate` to create the required tables. Without migrations, all logging features will fail silently.
Is there a way to limit how long request logs are retained to save storage space?
Yes. Configure retention policies in `config/requests-monitor.php` using the `prune` settings. Define rules like `days: 30` to automatically purge logs older than 30 days. The package handles pruning via a scheduled task or manually triggered command.
Will this package slow down my Laravel application if I enable it for all routes?
The overhead is minimal, primarily adding ~1–5ms per request for logging. For performance-critical apps, test under load. The `execution_ms` column can also help you identify slow endpoints to optimize further.
Are there alternatives to this package if I need more advanced features like real-time dashboards or alerts?
For real-time dashboards, consider packages like `spatie/laravel-analytics` or `laravel-activitylog`. For alerts, integrate with `laravel-monitor` or `sentry`. This package focuses on lightweight logging; extend it with third-party tools for visualization or notifications.
How do I manually trigger a log entry for an event that isn’t an HTTP request (e.g., a cron job or queue worker)?
Use the `RequestsMonitor::logAction()` facade or service container binding. Pass a descriptive name, metadata (e.g., `['job' => 'send-emails']`), and optionally a timestamp. Example: `RequestsMonitor::logAction('cron.run', ['job' => 'backup'], now());`.
Does the package support filtering or querying logged requests by specific criteria (e.g., user ID, endpoint, or time range)?
Yes. The package provides a `RequestsMonitor` facade with query methods like `whereUserId()`, `wherePath()`, and `whereBetween()`. Combine them with Laravel’s query builder for advanced filtering. Example: `RequestsMonitor::query()->wherePath('/api/users')->get()`.
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.
hamzi/corewatch
minionfactory/raw-hydrator
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