wolverine icon indicating copy to clipboard operation
wolverine copied to clipboard

Enhanced IAgent Model

Open jeremydmiller opened this issue 1 year ago • 1 comments

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 IHealthCheck directly into the IAgent model?
  • Have the IAgent s 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

jeremydmiller avatar Oct 01 '24 13:10 jeremydmiller

Yes, above should be a good starting point.

mysticmind avatar Oct 01 '24 15:10 mysticmind

I'm going to put this off for now and worry about it with CritterWatch. Might be an additional interface

jeremydmiller avatar Oct 23 '25 11:10 jeremydmiller