Add IAgent.Description for monitoring-tool tooltips#2645
Merged
jeremydmiller merged 1 commit intomainfrom May 1, 2026
Merged
Conversation
External monitoring tools (e.g. CritterWatch) want to render a
human-readable explanation of what each running agent does on a
given node. Today the only metadata available is the agent's URI,
which means tooltips collapse to "you have to know what
'wolverinedb://default' means."
Adds a default-implemented `Description` property on IAgent. The
default returns "{scheme} agent: {uri}" so existing
implementations stay source-compatible with no code change. Built-
in agent types override the property with text describing what
they actually do:
- DurabilityAgent (RDBMS): "Wolverine durability agent for {uri}
— recovers persisted inbox/outbox messages, runs scheduled
jobs, and emits persistence metrics."
- RavenDbDurabilityAgent: similar, RavenDB-flavoured.
- CosmosDbDurabilityAgent: similar, Cosmos-DB-flavoured.
- ExclusiveListenerAgent: "Exclusive listener for {endpoint} —
only one node at a time holds the listening role for this
endpoint, so the cluster avoids competing consumers."
- LeaderPinnedListenerAgent: "Leader-pinned listener for
{endpoint} — runs only on the cluster's elected leader node,
so the listening role moves with leader elections."
- StickyPostgresqlQueueListenerAgent: "Sticky Postgres queue
listener — pinned to the per-tenant database '{name}' for queue
'{name}'."
CritterWatch consumers can read `agent.Description` after looking
up the IAgent via `IAgentRuntime.TryFindActiveAgent<IAgent>(uri,
out var agent)`. No new public API needed beyond the property
itself; the existing `TryFindActiveAgent` already returns the
strongly-typed agent.
Tests: two new xUnit cases cover the default-interface fallback
(generic description from URI) and an explicit override winning
through. All four persistence projects build clean. Existing test
suite unaffected.
This was referenced May 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
External monitoring tools (e.g. CritterWatch) want to render a human-readable explanation of what each running agent does on a given node. Today the only metadata available is the agent's URI, which means tooltips collapse to "you have to know what `wolverinedb://default` means."
This PR adds a default-implemented `Description` property on `IAgent`. The default returns `"{scheme} agent: {uri}"` so existing third-party `IAgent` implementations stay source-compatible with no code change. Built-in agent types override the property with text describing what they actually do:
Consuming the description
Monitoring tools that want the per-agent description can read it after looking up the `IAgent`:
```csharp
if (runtime.Agents.TryFindActiveAgent(agentUri, out var agent))
{
var description = agent.Description;
// ...emit to telemetry / monitoring envelope...
}
```
No new public API surface beyond the property — `TryFindActiveAgent` already returns the strongly-typed agent.
Tests
Two new xUnit cases in `CoreTests/Runtime/Agents/IAgentDescriptionTests.cs`:
All four persistence projects (RDBMS, RavenDb, CosmosDb, Postgresql) build clean. Existing test suite unaffected.
Motivation / consumer
CritterWatch issue #93 is the immediate consumer — its Service / Nodes tab wants per-agent tooltips so operators can see at a glance what each running agent is doing without having to recognise URI conventions.