shureban/laravel-prometheus
Laravel package to expose Prometheus metrics. Install via Composer, publish config, switch Redis client to Predis, and create Counter/Gauge metrics via artisan commands or custom classes. Use DI to increment metrics with label values in your controllers.
http_request_duration_seconds).auth_events_total, purchase_conversions).Log::info()) with structured, queryable data, improving debugging and postmortems.prometheus/client_php) and wants Laravel-specific abstractions.prometheus/client_php directly).For Executives: "This package lets us instrument our Laravel app with Prometheus metrics—think of it as adding a ‘dashboard mode’ for our backend. We’ll track everything from API response times to user actions (e.g., sign-ups, purchases) in real time, enabling data-driven decisions on performance, cost, and scaling. It’s like turning on ‘developer tools’ for our infrastructure, but for the whole business. The best part? It’s a drop-in solution that avoids custom engineering, saving time and reducing risk. We’ll start with core metrics (e.g., error rates, latency) and expand to business-critical events (e.g., checkout conversions) as needed. This aligns with our observability roadmap and will pay dividends in debugging, capacity planning, and SLO management."
For Engineering: *"This is a lightweight Laravel wrapper for Prometheus that handles the heavy lifting of metrics collection. Key benefits:
country=US).Use Case Example:
Problem: Our API’s
/checkoutendpoint is slow, but we’re guessing which part is the bottleneck. Solution: Instrument the endpoint with acheckout_latency_secondshistogram and acheckout_errors_totalcounter. Prometheus will expose these metrics, and we’ll visualize them in Grafana to identify regressions.
Next Steps:
http_5xx_errors’)."*How can I help you explore Laravel packages today?