Skip to content

Outbound Events ​

Outbound events are messages your monitored service publishes back to the CritterWatch console. They flow over your existing Wolverine transport from the service to the console's critterwatch queue.

This page is for integrators who want to consume the same telemetry from their own infrastructure (a separate analytics pipeline, a custom dashboard, an audit system, etc.). For day-to-day operation, you don't need any of this — the console handles it for you.

How telemetry is shaped ​

Most outbound traffic is wrapped in a single ServiceUpdates batch, published every 2 seconds by default when there is something to send (PublishInterval; a service with a large fan-out backs off, up to once a minute). Each node also sends Wolverine's own WolverineHeartbeat every 30 seconds. A few message types are published on demand in response to specific console queries (handler source code, HTTP chain source code, pending-migration probe results, tenant list refresh), and command outcomes are published as they happen.

The batch carries everything CritterWatch needs to render a service's pages in one round-trip — endpoint snapshot, subscription catalog, persistence counts, shard states, agent health, and any change events that occurred since the previous batch.

What's in ServiceUpdates ​

cs
[MessageIdentity("Wolverine.CritterWatch.Messages.Outbound.ServiceUpdates")]
public class ServiceUpdates : ISerializable, ICritterWatchMessage
{
    // ONLY set on the first send
    public ServiceCapabilities? Capabilities { get; set; }

    public string Id { get; }
    public int NodeNumber { get; }

    public string Version { get; }
    public Uri CommunicationUri { get; }

    public ServiceUpdates(string id, int nodeNumber, string version, Uri communicationUri)
    {
        Id = id;
        NodeNumber = nodeNumber;
        Version = version;
        CommunicationUri = communicationUri;
    }

    public EndpointDescriptor[] Endpoints { get; set; } = [];

    public MessagingSubscription[] Subscriptions { get; set; } = [];

    public WolverineChange[] Changes { get; set; } = [];

    public StaleNodesEjected[] NodesEjected { get; set; } = [];
    
    public DateTimeOffset Timestamp { get; set; } = DateTimeOffset.UtcNow;
    public PersistenceCountsUpdated[] PersistenceCounts { get; set; }
    public MessageHandlingMetrics[] MessagingMetrics { get; set; }
    public ShardStateSnapshot[] ShardStates { get; set; } = [];

    /// <summary>
    /// Per-store authoritative shard-identity sets for stale-shard
    /// reconciliation. One entry per registered event store per poll; CritterWatch
    /// prunes any persisted shard it still holds for a store that is absent from
    /// the store's <see cref="ShardReconciliationMarker.KnownShardIdentities"/>.
    /// Empty on older Wolverine.CritterWatch builds that predate the field, in
    /// which case no reconciliation happens and stale orphan cards persist as
    /// before.
    /// </summary>
    public ShardReconciliationMarker[] ShardReconciliations { get; set; } = [];

    public AgentHealthReport[] HealthReports { get; set; } = [];
    public EndpointHealthReport[] EndpointHealthReports { get; set; } = [];

    /// <summary>
    /// Shards this node's daemon paused on a reported failure, with the classified reason. Empty on
    /// Wolverine.CritterWatch builds predating the field, and on any healthy node: a pause is an event, not
    /// a periodic snapshot, so this is populated only on the batch that follows one.
    /// </summary>
    public ProjectionPausedReport[] ProjectionPauses { get; set; } = [];

    /// <summary>
    /// Operator-declared throughput / exec-time baselines this service is
    /// advertising. Sent only on first activation (alongside Capabilities), so
    /// CritterWatch can seed its alert thresholds before it has its own
    /// historical samples. May be null/empty when no baselines were declared.
    /// </summary>
    public DeclaredBaseline[] DeclaredBaselines { get; set; } = [];

    /// <summary>
    /// Snapshot of the service's ASP.NET Core <see cref="IHealthCheck"/>
    /// registrations that reference Wolverine. Sent only on first
    /// activation alongside <see cref="Capabilities"/>. CritterWatch surfaces
    /// the result on the Service Details Overview tab so operators can confirm
    /// at a glance whether the service is wired up to k8s liveness/readiness
    /// probes. Null when the host hasn't registered any health checks at all.
    /// </summary>
    public HealthCheckRegistrationsDescriptor? HealthCheckRegistrations { get; set; }

    // Serialization plumbing (Write/Read) elided from the docs snippet.

The constructor carries the identity fields — Id, NodeNumber, Version, and the node's CommunicationUri. Capabilities is set only on the first send (see Capability advertisement).

The class has a few more members than the excerpt above shows, among them ActiveNodes (the node roster, on the leader's periodic full pass), MetricsMode (first send only), CapabilitiesHash (on every push, so a console that missed the capability announcement notices and asks again), ShardStateReport (whether ShardStates is a full pass or a delta) and ProtocolVersion (the wire protocol the service speaks: 1 for the 1.x wire, absent on clients older than 1.1).

The Changes array carries the discrete state-change events that occurred since the previous batch. The other arrays carry current state — endpoints (Endpoints), subscriptions (Subscriptions), agent and endpoint health (HealthReports / EndpointHealthReports), persistence counts (PersistenceCounts), messaging metrics (MessagingMetrics), and shard states (ShardStates). Not every array is complete on every push: agent and endpoint health are sent when they change (and restated every five minutes), and shard states are sent as deltas with a full pass every two minutes. A push too large for MaxPushWireBytes is divided into several, which the console merges.

Each ShardStateSnapshot carries an optional TenantId. On a single-tenant service it's always null. On a service using per-tenant projection partitioning, ShardStates contains one entry per (shard, tenant) pair, and the console aggregates them into the per-tenant view on the Projections page. Legacy services that haven't enabled per-tenant partitioning continue emitting nulls and look unchanged in the UI.

Change-event categories ​

A WolverineChange is (NodeNumber, AgentUri, Type, Timestamp), where Type is Wolverine's NodeRecordType:

TypeTriggerDrives
NodeStarted / NodeStoppedProcess node joined or left the clusterCluster tab → Nodes view
DormantNodeEjectedThe leader ejected a node that stopped heartbeatingNodes view + timeline
LeadershipAssumed / LeadershipLostNew leader elected, or a leader stepped downCluster tab → Leader pill
AgentStarted / AgentStopped / AgentPaused / AgentReleasedAgent assignment and lifecycle changesCluster tab → Agents view
AssignmentChangedThe leader reassigned agentsAgents view + timeline
ListenerLatchedA listener latchedEndpoints tab

Endpoint resilience events are not WolverineChanges. They travel as messages of their own: CircuitBreakerTrippedMessage / CircuitBreakerResetMessage, BackPressureTriggeredMessage / BackPressureLiftedMessage, plus ListenerLifecycleEvent and ProjectionLifecycleEvent.

On-demand response messages ​

These are published in response to a specific console query rather than on the regular cadence:

ResponseTriggered byCarries
HandlerSourceCodeResponseRequestHandlerSourceCodeGenerated handler source code for a message type
HttpChainSourceCodeReportedRequestHttpChainSourceCodeGenerated source code for an HTTP chain
HttpChainOpenApiReportedRequestHttpChainOpenApiOpenAPI descriptor for one HTTP chain (lazy-fetched on demand)
EndpointPropertiesReportedRequestEndpointPropertiesPer-endpoint Properties / Children config tree (lazy-fetched when the Pipeline tab opens an endpoint)
MessageHandlerPropertiesReportedRequestMessageHandlerPropertiesPer-handler Properties rows for one message type (lazy-fetched on the handler-chain detail page)
PendingMigrationsReportedResponseRequestPendingMigrationsCheckPending EF Core migration list for a DbContext
TenantListResponseRequestTenantListCurrent tenant list for multi-tenant services (one row per (tenantId, sourceName) when the service has multiple IDynamicTenantSource registrations)
AgentHealthReportRequestAgentHealthReport (or scheduled)Agent health snapshot
ProjectionCommandAckPauseProjection / RestartProjection / RebuildProjection / RewindSubscription / ScheduleProjectionRebuild / ScheduleSubscriptionRewindAcceptance, then the outcome. A refused command (license, unsupported store) completes as a refusal. A per-tenant fan-out reports FanOutCount, and each tenant acks with ParentRequestId.
RestartProjectionResultRestartProjection / RebuildProjectionSuccess/failure of the operation
DeadLetterQueueSummaryResults / DeadLetterDetailsDlqOperation (Summarize / Query)One answer per message database
DeadLetterGroupSummaryResultsDlqOperation (SummarizeGroups)One answer per message database: its dead letters grouped by failure group, message type, endpoint or exception type, with a count per group and what the database's store supports
DeadLetterQueueFanOutDlqOperationThe databases the operation will run against, announced once before it fans out
DlqOperationCompletedDlqOperation (Replay / Discard / EditAndReplay / Archive / Restore)One per database: how many dead letters were affected (Affected, null when the store does not report it) and the Error when it failed, or Cancelled when a CancelDlqOperation stopped it before it started. Echoes the operation's RequestId.
DeadLetterQueuePartialFailureDlqOperationOne per database that could not be read or acted on, with the error
ScheduledMessageDetails / ScheduledMessageSummaryResultsScheduledMessageOperationScheduled-message reads
ScheduledMessageEditedEditScheduledMessageConfirmation of edit + new execution time
RecurringScheduleCommandAck / RecurringScheduleStatesReportedPauseRecurringSchedule / ResumeRecurringSchedule / TriggerRecurringSchedule, and the telemetry cadenceThe command's outcome, and each schedule's live state
CompactionPolicyCommandAck / CompactionPolicyRunReportedRunCompactionPolicy, and every scheduled runWhat a compaction run did, or why it could not run
HighWaterLoopsReported / HighWaterDetectionCommandAckTelemetry, and RestartHighWaterDetectionEach node's high water detection loops; whether a restart took
HighWaterAdvancePreviewed / HighWaterAdvanceCommandAckPreviewHighWaterAdvance / AdvanceHighWaterMarkWhat an advance would skip, and whether it ran
RetiredProjectionVersionEjectedEjectRetiredProjectionVersionRows deleted, or why the service refused
StreamDetails / EventQueryResults / CompactStreamResultEventStoreOperation (FetchStream / QueryEvents / CompactStream)One stream's events, a page of events matching a query, and the outcome of compacting a stream — or why the service refused (for example, the Event Store Explorer is disabled)
SqlQueryResultsRequestSqlQueryRows of a read-only SQL statement, or why it was refused
DocumentHealthResponseRequestDocumentHealthThe sample size checked, the documents that failed to deserialize, and the shape changes between older and newer documents
DocumentTenantCountsResponseRequestDocumentTenantCountsOne count (or error) per tenant reached, how many tenants the store has, and how many were skipped
DocumentTypesResponse / DocumentsResponse / DocumentResponse / DocumentWriteResponseThe Document Explorer's requestsDocument reads, and the outcome of a save, delete or restore
CommandFailedAny relayed command or query whose handler threwThe exception type and message. The console records a failed command on the timeline; a failed query is only relayed to open tabs.
StaleNodesEjectedEjectNodeConfirmation of ejected node ids
SubscriptionOrProjectionRestartedAuto-restart on stallWhy and when

The three lazy-fetched responses (HttpChainOpenApiReported, EndpointPropertiesReported, MessageHandlerPropertiesReported) carry the bulky descriptor substructures that used to ship with every ServiceUpdates snapshot. They moved off the heartbeat path so the snapshot stays under the SQS / broker payload cap on big topologies — see Observer → Lazy-fetched detail panes.

Capability advertisement (on startup) ​

The first ServiceUpdates batch after startup carries the full capability set:

  • MessagingSubscription[] — every message type with its handler binding and routing role (Handler / Publisher).
  • EndpointDescriptor[] — every listener and sender with full configuration.
  • MessageStoreDiscovered — every Wolverine durability store with its database URI and store type.
  • Event-store and document-store metadata (Marten / Polecat / Fisher).
  • Recurring schedules and stream compaction policies.
  • Tenancy mode + current tenant list.
  • Wolverine version string.

This snapshot is re-issued whenever the Wolverine runtime is reinitialized, and resent (backing off from 15 seconds to 4 minutes) while an event store the service holds is missing from it. It replaces the prior shape wholesale — no merge logic.

Causation discovery ​

When the runtime observes that handling message A resulted in publishing message B, the service publishes a MessageCausationDiscovered event. The console aggregates these to draw the causation graph on the Message Topology page.

Causation is reported per discovered pair, not on every occurrence — once a causation is known, repeated observations don't re-publish.

Message shape on the wire ​

On the transport, CritterWatch messages use the CritterWatch serializer (UseCritterWatchSerializer()): Brotli-compressed JSON, or MessagePack for steady-state batches when UseMessagePackWireFormat is on. Every message that crosses the service/console wire carries a fixed [MessageIdentity]. Most are snake_case (dlq_operation_completed, projection_command_ack); a few keep the name they always had, such as the full type name for ServiceUpdates and dlq-operation for DlqOperation. The identities and every member are part of a committed 1.x wire contract, so a later console keeps reading 1.x services. A console that receives a ProtocolVersion newer than it understands logs a warning once per service.

When the console relays a message to the browser over SignalR, it uses the CloudEvents wrapper:

json
{
  "type": "dlq_operation_completed",
  "data": {
    "serviceName": "trip-service",
    ...
  }
}

The type discriminator is the message identity. Properties inside data are camelCase. Enums serialize as string names. See SignalR Integration.

Consuming telemetry from your own infrastructure ​

If you want to subscribe to the same telemetry stream from a separate process (analytics, custom audit, etc.):

  1. Have your service also publish the telemetry to a queue you own, using Wolverine's transport routing. Never add a second listener to the console's critterwatch queue: a second consumer competes with the console for each message, so every batch your process reads is a batch the console never sees.
  2. Reference Wolverine.CritterWatch and deserialize the message types directly.
  3. Do not treat each ServiceUpdates push as a complete snapshot. As described above, agent and endpoint health are sent when they change, shard states are deltas with a full pass every two minutes, and a push larger than MaxPushWireBytes is split into several. Fold the deltas into the state you hold, and treat the periodic full pass as authoritative. Don't reconstruct state from the Changes array alone either: some change events depend on having seen the prior state.

For analytics pipelines, the high-volume surface is ServiceUpdates (one per publish interval per node). The bursty / on-demand surface is the response messages and the alert lifecycle events emitted by the console (which are republished over SignalR for the browser; you can subscribe to that hub if your consumer is a server-side SignalR client).