dbstudios/prometheus-client-bundle
dbstudios/prometheus-client library via direct Composer integration (since Laravel supports Symfony components). This avoids vendor lock-in to Symfony’s ecosystem.ApcuAdapter, RedisAdapter) allows flexibility in storage backends, making it adaptable to Laravel’s caching/queue systems (e.g., Redis, Memcached)./metrics), which can be scraped by Prometheus servers. Laravel’s routing system can proxy or embed this endpoint.app/config vs. config/packages).dbstudios/prometheus-client (v3.0.0+) via Composer, then manually register adapters in Laravel’s AppServiceProvider./metrics endpoint (routeable via Laravel’s Route::get).dbstudios/prometheus-client in a staging environment with PHP 8.1+./api/orders) with a histogram to measure response times.dbstudios/prometheus-client-bundle to composer.json.config/app.php (Symfony-style).config/packages/dbstudios_prometheus.yaml.dbstudios/prometheus-client to composer.json.AppServiceProvider:
$this->app->singleton(AdapterInterface::class, function () {
return new RedisAdapter(); // Customize for Laravel's Redis config
});
Route::get('/metrics', [PrometheusHandler::class, 'handle']);
promtool to validate Prometheus config./metrics endpoint under production-like traffic.Kernel.php).prometheus_client_php\CollectorRegistry::defaultRegistry()).config.yml vs. Laravel’s config/).HttpFoundation components sparingly to minimize bloat.php artisan config:cache) to avoid runtime overrides.dbstudios/prometheus-client usage to avoid Symfony-specific quirks.scrape_interval to balance load./metrics endpoint failures may break Prometheus scraping. Add health checks.scrape_configs. Validate with promtool check config.How can I help you explore Laravel packages today?