Wolverine.CritterWatch Overview
Wolverine.CritterWatch is the lightweight NuGet package installed in each service you want CritterWatch to monitor. It hooks into the Wolverine runtime using the IWolverineObserver extension point and continuously publishes telemetry to the CritterWatch server.
What It Does
The observer integrates with your service at the Wolverine runtime level — no changes to your handlers, aggregates, or domain logic are required. Once registered, it:
- Captures runtime events — node lifecycle, agent assignments, endpoint health, message store discovery
- Batches state snapshots — aggregates changes into a
ServiceUpdatesmessage every second - Publishes to CritterWatch — sends batches over the configured transport (RabbitMQ, etc.)
- Handles inbound commands — responds to operator actions from the CritterWatch UI
- Performs health checks — actively probes agent health every 60 seconds and reports results
Architecture
CritterWatchObserver
The CritterWatchObserver class implements IWolverineObserver and receives callbacks for all Wolverine runtime events:
NodeStarted/NodeStopped— process node lifecycleAgentStarted/AgentStopped— agent assignment changesLeadershipAssumed— leadership election resultsEndpointListened/EndpointStopped— listener lifecycleCircuitBreakerTripped/CircuitBreakerReset— endpoint resilience eventsBackPressureTriggered/BackPressureLifted— flow control eventsExceptionTriggered— message handler exceptions
In addition to reactive observation, the observer runs a periodic timer that:
- Publishes a full state snapshot even when nothing has changed (heartbeat)
- Performs active agent health checks using
IAgentRuntime - Cleans up stale node records
ServiceUpdates Batch
Rather than publishing individual events, the observer batches all changes into a single ServiceUpdates message per second. This reduces network chattiness and allows CritterWatch to apply changes atomically.
A ServiceUpdates packet contains:
public record ServiceUpdates(
string ServiceName,
EndpointState[] Endpoints,
MessagingSubscription[] Subscriptions,
WolverineChange[] Changes,
AgentHealthReport[] AgentHealth,
PersistenceCounts PersistenceCounts
);Capabilities Discovery
On first registration and whenever the runtime restarts, the observer discovers and reports:
- All registered message types and their handler mappings
- All messaging endpoints with their configuration
- All Marten event stores and message stores
- Multi-tenancy configuration (cardinality and tenant list)
- Wolverine version string
This gives CritterWatch a complete picture of each service's topology without needing direct database or source code access.
Registration
See Registration for full configuration options.
Inbound Commands
See Inbound Commands for all 22+ commands CritterWatch can send.
Outbound Events
See Outbound Events for all 20+ event types services publish.
