Table of Contents

Interface IContextFlowTracker

Namespace
Excalibur.Dispatch.Observability.Context
Assembly
Excalibur.Dispatch.Observability.dll

Interface for context flow tracking operations.

public interface IContextFlowTracker
Extension Methods

Methods

CorrelateAcrossBoundary(IMessageContext, string)

Correlates context across service boundaries.

void CorrelateAcrossBoundary(IMessageContext context, string serviceBoundary)

Parameters

context IMessageContext

The context being correlated.

serviceBoundary string

The boundary the context traversed.

DetectChanges(IMessageContext, string, string)

Detects changes between pipeline stages.

IEnumerable<ContextChange> DetectChanges(IMessageContext context, string fromStage, string toStage)

Parameters

context IMessageContext

The context to inspect.

fromStage string

The originating stage.

toStage string

The destination stage.

Returns

IEnumerable<ContextChange>

A collection describing detected changes.

GetContextLineage(string)

Gets the complete lineage of a context.

ContextLineage? GetContextLineage(string correlationId)

Parameters

correlationId string

The correlation identifier to retrieve.

Returns

ContextLineage

The context lineage or null if not found.

GetMessageSnapshots(string)

Gets all snapshots for a specific message.

IEnumerable<ContextSnapshot> GetMessageSnapshots(string messageId)

Parameters

messageId string

The identifier of the message to inspect.

Returns

IEnumerable<ContextSnapshot>

A collection of recorded snapshots.

RecordContextState(IMessageContext, string, IReadOnlyDictionary<string, object>?)

Records the current state of a message context.

void RecordContextState(IMessageContext context, string stage, IReadOnlyDictionary<string, object>? metadata = null)

Parameters

context IMessageContext

The context being recorded.

stage string

The pipeline stage identifier.

metadata IReadOnlyDictionary<string, object>

Optional metadata associated with the snapshot.

ValidateContextIntegrity(IMessageContext)

Validates context integrity.

bool ValidateContextIntegrity(IMessageContext context)

Parameters

context IMessageContext

The context to validate.

Returns

bool

true when the context passes validation; otherwise false.