Skip to content

How CritterWatch Works ​

This page is the operator-level mental model. It covers what infrastructure CritterWatch needs, how data gets from your services into the console, and how fresh that data is — enough to plan a deployment, debug a misconfigured service, and read the dashboards without surprises.

If you're integrating Wolverine.CritterWatch into a service for the first time, start with the Quick Start. If you're deploying the console, see Hosting Guide.

The shape of a deployment ​

CritterWatch sits next to the services it monitors. There are three pieces:

  • Each monitored service runs the Wolverine.CritterWatch package. It hooks into Wolverine's runtime, batches up state, and publishes it every 2 seconds by default (backing off on a service with a large fan-out), plus a liveness heartbeat every 30 seconds.
  • CritterWatch server is a single ASP.NET Core process. It receives telemetry, persists it to its own database, runs the alert evaluator, and serves the web console. It can also run embedded inside one of your own applications, monitoring that application.
  • Operator commands (replay, pause listener, rebuild projection, etc.) travel from the browser to the console over the SignalR connection, and from the console through the same transport to the target service. The explorers' reads (event store, documents, SQL) travel the same way and run on the service, against its own stores.

Infrastructure you need ​

ComponentPurposeNotes
A database for the console — PostgreSQL 14+, SQL Server, or SQLiteBacks the CritterWatch server's own bookkeeping (alerts, audit log, timeline).Pick the flavour package that matches: CritterWatch (Marten/PostgreSQL), CritterWatch.SqlServer (Polecat/SQL Server), or CritterWatch.Sqlite (Fisher/SQLite — a file, no server). Dedicated database; CritterWatch won't touch your application's databases.
Wolverine transportCarries telemetry from services to the console and commands back.Use whichever transport your services already run (RabbitMQ, SQS, Azure Service Bus, or broker-less HTTP / gRPC). The console can listen on several in parallel.
CritterWatch serverASP.NET Core process that serves the browser UI and runs alert evaluation.Runs as a single instance by default, or as a cluster (2+ nodes behind a load balancer with a SignalR backplane) for HA.

Your monitored services don't need any new database or new ports — they reuse the Wolverine transport they already have. CritterWatch never opens a connection to your service's databases.

How fresh is the data? ​

End-to-end latency from a state change in your service to a pixel changing in the browser is typically 2–3 seconds at the default cadence:

StageTypical time
Wolverine event → observer batch~immediate (lock-free queue push)
Observer batch → telemetry publish≤ 2 seconds (PublishInterval)
Transport delivery + console handling + DB write~100–350 ms (includes the console's 250 ms ingest batching)
Browser update via SignalR~100ms, plus the console's 100 ms push batching

The batching window is the dominant lag. It's deliberate: every publish is a write of the service's summary in the console's database, so publishing per event would multiply both broker traffic and console writes without helping the operator. A service with 250 or more tenants, databases or endpoints backs off automatically (to as much as 60 seconds), and every screen shows how old the reading it renders is.

A few things are reported on a slower cadence and lag accordingly:

  • Heartbeat dot — 30 second cadence; amber after 60s, red after 150s. See Services → Heartbeat dot.
  • Agent health probe — ~60 second cadence, reported when a result changes and restated every 5 minutes. The probe is active so silent agent failures eventually surface.
  • Broker health probe — ~60 second cadence per transport.
  • Pending EF Core migrations — on demand only; the operator clicks a button. Reading __EFMigrationsHistory opens a live database connection per click.

What gets sent to the console ​

The monitored service publishes its own state — CritterWatch never reaches in to scrape data:

  • Identity & topology — service name, Wolverine version, registered handlers, endpoints, message stores, event stores, tenants.
  • Live counts — inbox / outbox / DLQ depth, per-tenant counters, persistence queue depths.
  • Lifecycle changes — node added/removed, leader elected, agent assigned/stopped, projection shard advanced, circuit breaker tripped, back pressure activated.
  • Health — agent health probe results, broker reachability, service heartbeat.

Connection strings, database credentials, and message bodies are not included in the regular telemetry stream. (Message bodies are only fetched when an operator opens a specific dead-letter or scheduled message for inspection.)

What about the data CritterWatch keeps? ​

The console persists its own bookkeeping in its own database — alerts, the audit log, timeline entries, and a rolling history of metric samples. Retention is set in the console host's configuration (CritterWatch:Timeline, CritterWatch:Metrics) and shown, read-only, on Settings → Data Retention. The defaults are 30 days and at most 250,000 rows per service for the timeline, and 45 days for metric samples. The audit log has no retention setting and is kept indefinitely.

Service state itself is reconstructable from telemetry — if you wipe the CritterWatch database, the next telemetry snapshot from each running service rebuilds it. The historical timeline and audit log are the parts that are truly persistent.

Failure isolation ​

Three properties to keep in mind:

  • Services run independently of CritterWatch. If the console is down, your services keep processing messages. Telemetry waits in the transport, but routine telemetry batches expire after ten minutes (heartbeats after five heartbeat intervals, at least two minutes): an older backlog is discarded rather than replayed, and the console rebuilds current state from the next snapshot each service sends.
  • Services don't trust each other through CritterWatch. Commands are routed to a specific service's queue; one service can't issue commands on behalf of another.
  • CritterWatch failures don't cascade. The transport queue, not direct calls, decouples services from the console.

What CritterWatch does require to function: the console's database must be reachable for queries (alerts, audit log, etc.), and the SignalR WebSocket must reach the browser. Neither failure affects monitored services.

What kind of scale this targets ​

CritterWatch is designed for dozens to a few hundred monitored services, and for services with hundreds of databases and thousands of tenants — the 1.1 Operations screens were built against a field fleet of 512 databases and 11,637 projection shards. The primary bottleneck is the transport listener and the database write throughput on the console side; the publish-side cost on each monitored service is negligible (one batched publish per interval).

The CritterWatch server runs as a single instance by default. Clustering is opt-in: for HA, run 2+ nodes behind a load balancer with a SignalR backplane (Redis or Azure SignalR Service) and a sharded telemetry topology. See Clustering. For very large deployments, contact JasperFx for guidance.

Topics ​

  • Message Flow — what triggers a console update and what triggers a service-side command, end to end.
  • Transport Channels — using Wolverine's HTTP or gRPC transport endpoints as the CritterWatch ↔ service channel instead of (or alongside) a message broker.
  • Event Sourcing — the operational history CritterWatch keeps (timeline, audit log, alert lifecycle) and how it's persisted in the console's event store.
  • Multi-Tenancy — how tenants are discovered and scoped in the UI; runtime tenant management.
  • EF Core Monitoring — how DbContexts get reported and what the badges on the Storage tab mean.
  • Source Generator — how CritterWatch.SourceGeneration discovers aggregates, handlers, and sagas at build time, and how Wolverine.CritterWatch merges the per-project manifests at runtime.
  • MCP integration — how AI agents query and operate the system through the same data plane the console reads from.