wolverine
wolverine copied to clipboard
Enhanced IAgent Model
cc @mysticmind
Today IAgent (the running background processes which would include the projection / subscriptions to marten now, Wolverine's backing for virtual agents)
is this:
public interface IAgent : IHostedService
{
/// <summary>
/// Unique identification for this agent within the Wolverine system
/// </summary>
Uri Uri { get; }
// Added in 3.0, doesn't really do much for you
AgentStatus Status { get; }
}
public enum AgentStatus
{
Started,
Stopped
}
Two ideas for extension:
- For maybe 3.0 and definitely by 4.0, how about we add
IHealthCheckdirectly into theIAgentmodel? - Have the
IAgents expose a description of what metrics and/or Otel spans they export. Marten's projections export a counter on events processed, a histogram of the "gap", and spans for loading, grouping, and execution. Maybe that can be used to integrate inside of Critter Watch with PromQL calls
Yes, above should be a good starting point.
I'm going to put this off for now and worry about it with CritterWatch. Might be an additional interface