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 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

Getting Started

Install via Composer:

composer require vendor/package-name

Publish the package config (if needed) to customize new settings:

php artisan vendor:publish --provider="Vendor\PackageName\PackageServiceProvider" --tag="config"

Key new feature: The execution_ms column is now available in query results by default—no additional setup required. For URL changes, ensure your existing queries use the updated url column (now standardized to canonical_url).

First use case: Fetch performance metrics alongside URLs:

$results = PackageName::query()->get();
foreach ($results as $item) {
    echo "URL: {$item->canonical_url} | Time: {$item->execution_ms}ms";
}

Implementation Patterns

Querying with New Columns

Leverage the new execution_ms column for performance tracking:

$slowQueries = PackageName::where('execution_ms', '>', 500)->get();

Config Customization

Update your config/package-name.php to adjust:

  • url_column (now defaults to canonical_url)
  • execution_threshold (for alerts)
  • enabled_metrics (toggle execution_ms visibility)

Integration with Existing Workflows

  1. Migrations: If using raw queries, update your SELECT statements to include execution_ms.
  2. Observers/Events: Listen for PackageName\Events\MetricUpdated to react to new data.
  3. API Responses: Normalize responses to include the new column:
    return $this->transform($item, [
        'url' => 'canonical_url',
        'execution_time' => 'execution_ms',
    ]);
    

Gotchas and Tips

Breaking Changes

  • Column Name Shift: The url column is now canonical_url by default. Update all queries/models:
    // Old (deprecated)
    $item->url;
    
    // New
    $item->canonical_url;
    
  • Config Overrides: If you previously set url_column to a custom value, ensure it’s updated in the new config or the package will default to canonical_url.

Debugging

  • Missing execution_ms: Verify the config key enabled_metrics.execution_ms is set to true.
  • URL Mismatches: Run php artisan vendor:clear-cache if the new column isn’t appearing in queries.

Extension Points

  • Custom Metrics: Extend the package by adding your own columns to the metrics config array:
    'custom_metrics' => [
        'memory_usage' => 'memory_usage_kb',
    ],
    
  • Query Scopes: Create reusable scopes for performance analysis:
    class PerformanceScope {
        public function slowQueries($threshold = 500) {
            return function ($query) use ($threshold) {
                return $query->where('execution_ms', '>', $threshold);
            };
        }
    }
    

Performance Tip

Use the execution_ms column to optimize queries:

// Cache results under 100ms
$fastResults = PackageName::where('execution_ms', '<=', 100)->remember(60);
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