webpatser/resonate-pulse v1.1.0. Laravel Pulse cards for the Resonate plugin family, each driven by a Pulse recorder that ingests on a beat or on an event.
Cards
| Card | Source plugin | Recorder | Pulse series |
|---|---|---|---|
| Roster | Roster | Pulse\RosterRecorder (beat) |
resonate_roster_rooms, resonate_roster_users, resonate_roster_connections |
| Webhooks | Webhooks | Pulse\WebhooksRecorder (events) |
resonate_webhook_delivered, resonate_webhook_failed |
| UserCap | User cap | Pulse\UserCapRecorder (event) |
resonate_user_cap_exceeded |
| TokenAuth | Token auth | Pulse\TokenAuthRecorder (event) |
resonate_token_rejected |
A recorder is only useful when its source plugin is installed. The package does not hard-require the three event-driven plugins. You opt in to each recorder in config/pulse.php and register only the cards you have data for.
Requirements
- PHP 8.6+ and Laravel 13.
webpatser/fledge-pulse1.8.1.4+, installed automatically. It replaceslaravel/pulse(sameLaravel\Pulsenamespace), so the two cannot be installed side by side. Removelaravel/pulsefrom your app'scomposer.jsonbefore requiring this package.webpatser/resonate1.4+.webpatser/resonate-roster1.2+. The Roster card and recorder always require it.
Install
composer require webpatser/resonate-pulsephp artisan vendor:publish --tag=resonate-pulse-config
Add only the recorders for the plugins you have installed to config/pulse.php:
'recorders' => [ // ... your other recorders \Webpatser\ResonatePulse\Pulse\RosterRecorder::class => [], // requires resonate-roster \Webpatser\ResonatePulse\Pulse\WebhooksRecorder::class => [], // requires resonate-webhooks \Webpatser\ResonatePulse\Pulse\UserCapRecorder::class => [], // requires resonate-user-cap \Webpatser\ResonatePulse\Pulse\TokenAuthRecorder::class => [], // requires resonate-token-auth],
Pulse subscribes each recorder to its $listen event or, for RosterRecorder, the per-second IsolatedBeat. Your existing pulse:check schedule keeps running them.
Add the cards
Publish the Pulse dashboard if you have not yet:
php artisan vendor:publish --tag=pulse-dashboard
Drop the cards you want into resources/views/vendor/pulse/dashboard.blade.php:
<x-pulse> <livewire:resonate-pulse.roster cols="6" rows="2" /> <livewire:resonate-pulse.webhooks cols="6" rows="2" /> <livewire:resonate-pulse.user-cap cols="6" rows="2" /> <livewire:resonate-pulse.token-auth cols="6" rows="2" /> {{-- ...your other cards --}}</x-pulse>
Configuration
| Key | Default | Purpose |
|---|---|---|
interval |
15 |
Roster sampling interval in seconds: the recorder samples once this many seconds have elapsed since its last sample. 0 or less turns the roster recorder off. The other recorders are event-driven and ignore it. Env: RESONATE_PULSE_INTERVAL. |
How the recorders write
- Roster is a beat recorder. On each sample it takes one bulk snapshot of the roster and writes three series with avg and max aggregates. The snapshot uses
RoomRoster::snapshot(), so the cost does not grow with the number of channels. - Webhooks, UserCap and TokenAuth are event recorders. Each Laravel event becomes one Pulse record with
countas the aggregate. Buckets are by application id (Webhooks, UserCap) or rejection reason (TokenAuth).
The Roster card gathers per application and totals the result. When the server has more than one application configured, the card breaks the totals down per application and names the application beside each top room. The same user id in two applications counts as two people.