Class RingBufferObserver
A ResultFlowObserver that stores the last Capacity pipeline executions in an in-memory ring buffer. Thread-safe. Zero persistence — cleared on restart.
public sealed class RingBufferObserver : ResultFlowObserver
- Inheritance
-
RingBufferObserver
- Inherited Members
- Extension Methods
Constructors
RingBufferObserver(int)
public RingBufferObserver(int capacity = 50)
Parameters
capacityint
Properties
Capacity
public int Capacity { get; }
Property Value
Methods
Clear()
Clears all captured traces.
public void Clear()
GetTraces()
Returns a snapshot of captured traces, oldest first.
public IReadOnlyList<PipelineTrace> GetTraces()
Returns
OnNodeExit(NodeExitContext)
Called immediately after a node completes, with the outgoing result.
public override void OnNodeExit(NodeExitContext ctx)
Parameters
ctxNodeExitContext
OnPipelineEnd(PipelineEndContext)
Called once after the pipeline completes (success or failure).
public override void OnPipelineEnd(PipelineEndContext ctx)
Parameters
OnPipelineStart(PipelineStartContext)
Called once before the first node executes.
public override void OnPipelineStart(PipelineStartContext ctx)
Parameters
Save(string?)
Serializes all captured traces to a JSON file so the REslava VSIX Debug panel
can load them without a running HTTP server.
Default path: reslava-traces.json next to the executing assembly
(BaseDirectory).
Overwrites any existing file.
public void Save(string? path = null)
Parameters
pathstringOptional absolute or relative path. When
null, writes to{AppContext.BaseDirectory}/reslava-traces.json.