laravel / reverb

Laravel Reverb provides a real-time WebSocket communication backend for Laravel applications.
https://reverb.laravel.com
MIT License
1.02k stars 71 forks source link

Feature Request: Prometheus Metrics #172

Closed cdwieber closed 4 months ago

cdwieber commented 4 months ago

We leverage Prometheus/Grafana quite a bit in our APM stack, so it would be awesome if Reverb provided a metrics endpoint that we could monitor. Reverb already publishes some metrics to Pulse, so I think a logical starting point would be to provide those same metrics to an endpoint with a default route of /reverb/metrics, or something similar.

We switched to Reverb from Soketi, which does provide these and could serve as inspiration for implementation: https://docs.soketi.app/advanced-usage/scraping-prometheus-metrics

I could see, however, wanting to keep the package lean, and allow devs to roll their own solutions with something like: https://github.com/spatie/laravel-prometheus

I gave the source code a cursory glance, and it looks like it wouldn't be too much of a lift to abstract out those specific metrics.

All told, really loving Reverb so far, gave it a trial-by-fire last night in a production scenario with lots of traffic and it held up like a champ.

driesvints commented 4 months ago

Thank you for your suggestion. Right now we don't have plans for this sorry. You can always attempt a PR yourself so we have some code we can look at, thanks.