SignalR Integration
CritterWatch uses SignalR between the console and the browser, in both directions: the console pushes live updates, and the browser sends its operator commands and on-demand queries. As an operator, you don't need to know any of this — the browser handles it. As an integrator who wants to consume the live feed from your own client, this page covers the contract.
Where it lives
The SignalR hub is mounted at /api/messages (configurable via UseCritterWatch(signalRRoute: "...")). It is the console's command channel as well as its push channel: replaying or discarding dead letters, pausing a listener, rebuilding a projection, acknowledging an alert and the rest are Wolverine messages sent over this hub, and the console relays them to the target service. The HTTP API at /api/critterwatch/* is for reads. See HTTP API Reference.
Both directions use one hub method, ReceiveMessage, carrying a CloudEvents envelope (see Wire format).
With a Redis connection string named redis in the console's configuration, the hub uses a Redis backplane, so a push reaches browsers connected to any node of a clustered console.
Connection lifecycle
The browser connects via the standard @microsoft/signalr JavaScript client with automatic reconnect. On every connect and reconnect it sends request_all_service_summaries over the hub and receives the connect snapshot (all_service_summaries) in reply. Pages that loaded something on demand, such as an agent roster, ask for it again after a reconnect. A connection that keeps dying right after it reconnects backs off to 30 seconds between attempts.
The connection indicator in the header tells you which state you're in:
- Green — connected and receiving live updates.
- Yellow — reconnecting (brief blip, automatic recovery).
- Red — disconnected; the page is showing stale data.
The indicator describes the browser's own connection. Whether the console is still applying telemetry is a separate question, answered by the observation ages on each screen and the ingest-health chip.
What gets pushed
Every event that should reach the browser is relayed onto the hub after the console handles it. The major message types:
| Message | What it carries |
|---|---|
all_service_summaries | The connect snapshot: every service, with agent-roster counts rather than the roster itself |
service_summary_changed / summary_updated | One service's state after a telemetry batch is applied |
service_capabilities_changed | A service's capabilities (handlers, endpoints, stores) changed |
agent_and_node_state_changed / agent_health_changed | Agent and node changes, sent only to tabs that have a Service Details or Node Detail page open |
alert_raised_message / alert_elevated_message / alert_reduced_message / alert_resolved_message / alert_acknowledged_message / alert_snoozed_message / alert_cleared_message | Alert lifecycle. Several at once arrive together as alert_changes_batch. |
alert_triaged_message | A language-model assessment of an alert batch, when alert triage is on |
shard_states_changed | Projection shard progress, sent only to tabs subscribed to that service |
persistence_counts_changed | Inbox / outbox / scheduled / dead-letter counts |
endpoint_health_changed / broker_health_changed | Listener and broker health |
metrics_rollup / all_metrics_rollups | Metrics roll-ups |
timeline_entry_added | Activity timeline entry |
command_accepted / command_rejected / command_failed | What happened to a command the browser sent: relayed, refused by the console (license, RBAC, unknown service, licensed-cap), or failed on the service |
dead_letter_queue_fan_out / dlq_operation_completed / dead_letter_queue_partial_failure | A dead-letter operation's progress: the databases it will run against, each database's outcome, and each database that could not be read |
projection_command_ack | A projection command's acceptance and outcome |
self_monitoring_status_changed | Whether the console is applying its own telemetry |
Plus on-demand response messages — dead-letter details and summaries, handler and HTTP chain source code, event store and document reads, SQL results, pending-migration probe results, tenant list refresh — sent to the connection that asked, when the browser opens the corresponding page.
The generated TypeScript classes under src/FrontEnd/src/messages/ are the complete list, and relayToStore.ts shows which store each one reaches.
Wire format
All messages use the Wolverine CloudEvents envelope:
{
"type": "service_summary_changed",
"data": {
"serviceName": "trip-service",
...
}
}The type discriminator is the message's identity, which is snake_case for every type the browser handles. Properties inside data are camelCase. Enums serialize as string names ("Query", not 1).
This serialization is configured by the Wolverine SignalR transport and applies to every message on the hub.
Subscribing from a custom client
If you want a server-side or out-of-browser client to subscribe to the live feed:
- Add the standard SignalR client for your platform.
- Connect to
https://<your-console>/api/messages(or your custom route). - Authenticate the same way browsers do — typically via a cookie or bearer token, depending on how you've configured authentication on the console.
- Register a handler for
ReceiveMessageand dispatch on the envelope'stype. - Unwrap
batched_web_socket_payloadandalert_changes_batch, which carry several messages in one frame. - Send
request_all_service_summariesafter connecting if you want the current state rather than only the changes that follow.
A command sent from your client goes through the same checks as one from the browser: the license tier, RBAC when the host registers an authorizer, and the audit log. Its answer comes back on the same connection as command_accepted or command_rejected.
Batching and back pressure
The console batches what it pushes. Messages published within 100 ms of each other leave as one batched_web_socket_payload frame per destination, and alert changes as one alert_changes_batch. Messages scoped to one service's subscribers, such as shard progress, are batched separately so they are not broadcast to every tab.
A very busy fleet can still drive a high message rate per connection — keep that in mind if you're building a custom client that does heavy per-message work. The browser SPA buffers updates and applies them on the next animation frame, which is what keeps the UI smooth on bursty services.
If you're seeing browser CPU or network spikes, see Store Inspector → message log to confirm which message types are noisy.
