0.2.3 • Published 1 month ago

@stacksleuth/laravel-agent v0.2.3

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

@stacksleuth/laravel-agent

StackSleuth Laravel Agent

StackSleuth Laravel Agent

npm version License: MIT TypeScript Node.js

🚀 What is StackSleuth Laravel Agent?

Comprehensive Laravel performance monitoring agent - Eloquent ORM optimization, route performance analysis, middleware tracking, job queue monitoring, and advanced cache performance metrics.

✨ Key Features

  • 🎼 Eloquent ORM Monitoring: Query optimization and N+1 detection
  • 🛣️ Route Performance: Laravel route execution analysis
  • 🔧 Middleware Tracking: Request middleware performance monitoring
  • ⚙️ Job Queue Monitoring: Background job performance tracking
  • 🗄️ Cache Performance: Laravel cache system optimization
  • 📧 Mail Tracking: Email sending performance analysis
  • 🔄 Event Monitoring: Laravel event system performance
  • Artisan Integration: Command-line monitoring capabilities

📦 Installation

npm install @stacksleuth/laravel-agent
yarn add @stacksleuth/laravel-agent
pnpm add @stacksleuth/laravel-agent

🏁 Quick Start

<?php
// config/app.php
'providers' => [
    // ... other providers
    StackSleuth\Laravel\StackSleuthServiceProvider::class,
],

// config/stacksleuth.php
return [
    'enabled' => env('STACKSLEUTH_ENABLED', true),
    'sample_rate' => env('STACKSLEUTH_SAMPLE_RATE', 0.1),
    'monitor_eloquent' => true,
    'monitor_cache' => true,
    'monitor_jobs' => true,
];

// In your controller
use StackSleuth\Laravel\Facades\StackSleuth;

class UserController extends Controller
{
    public function index()
    {
        StackSleuth::startSpan('fetch-users');
        
        $users = User::with('profile')->paginate(10);
        
        StackSleuth::endSpan();
        
        return response()->json($users);
    }
}

📚 Resources

🤝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

📄 License

MIT License - see the LICENSE file for details.


WebsiteDocumentationNPM RegistryGitHub

Made with ⚡ by StackSleuth