Skip to content

StreamTracingBehavior<TMessage, TResult> class

Namespace: Vitreous.DevUI.Tracing
Assembly: Vitreous.DevUI.dll

Stream pipeline behavior that captures two traces per stream dispatch:

  • An Opened trace — appended immediately when setup completes (or fails).
  • A Closed trace — appended by TracedAsyncEnumerator<T> when the enumerator is disposed, including the total item count and stream duration.

Both traces share the same StreamId. Passes straight through, recording nothing, until the developer UI is activated (see DevUIState).

public sealed class StreamTracingBehavior<TMessage, TResult> : IStreamPipelineBehavior<TMessage, TResult> where TMessage : IStreamQuery<TResult>

TMessage

TResult

object ← StreamTracingBehavior<TMessage, TResult>

IStreamPipelineBehavior<TMessage, TResult>

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

StreamTracingBehavior(TraceStore, DevUISerializer, DevUIState, VitreousDevUIOptions)

Section titled “ StreamTracingBehavior(TraceStore, DevUISerializer, DevUIState, VitreousDevUIOptions)”
public StreamTracingBehavior(TraceStore store, DevUISerializer serializer, DevUIState state, VitreousDevUIOptions options)

store TraceStore

serializer DevUISerializer

state DevUIState

options VitreousDevUIOptions

Handle(TMessage, StreamQueryHandlerDelegate<TMessage, TResult>, CancellationToken)

Section titled “ Handle(TMessage, StreamQueryHandlerDelegate<TMessage, TResult>, CancellationToken)”

Executes this behavior step, calling next to continue the pipeline.

public ValueTask<Result<IAsyncEnumerable<TResult>>> Handle(TMessage message, StreamQueryHandlerDelegate<TMessage, TResult> next, CancellationToken ct = default)

message TMessage

next StreamQueryHandlerDelegate<TMessage, TResult>

ct CancellationToken

ValueTask<Result<IAsyncEnumerable<TResult>>>