Table of Contents

Class SagaInstanceInfo

Namespace
Excalibur.Saga.Abstractions
Assembly
Excalibur.Saga.dll

Information about a saga instance for monitoring purposes.

public sealed record SagaInstanceInfo : IEquatable<SagaInstanceInfo>
Inheritance
SagaInstanceInfo
Implements
Inherited Members

Remarks

This record provides a summary view of saga state suitable for monitoring dashboards. It intentionally excludes the full saga state (StateJson) to minimize data transfer.

To determine saga health:

  • Healthy: IsCompleted == false and recently updated
  • Stuck: IsCompleted == false and not updated within threshold
  • Failed: FailureReason != null
  • Completed: IsCompleted == true and FailureReason == null

Constructors

SagaInstanceInfo(Guid, string, bool, DateTimeOffset, DateTimeOffset, DateTimeOffset?, string?)

Information about a saga instance for monitoring purposes.

public SagaInstanceInfo(Guid SagaId, string SagaType, bool IsCompleted, DateTimeOffset CreatedAt, DateTimeOffset LastUpdatedAt, DateTimeOffset? CompletedAt, string? FailureReason)

Parameters

SagaId Guid

The unique identifier for the saga instance.

SagaType string

The fully qualified type name of the saga.

IsCompleted bool

Indicates whether the saga has completed. A completed saga may have succeeded or failed with compensation.

CreatedAt DateTimeOffset

The UTC timestamp when the saga was created.

LastUpdatedAt DateTimeOffset

The UTC timestamp when the saga was last updated.

CompletedAt DateTimeOffset?

The UTC timestamp when the saga completed, or null if still running.

FailureReason string

The failure reason if the saga failed, or null if succeeded or still running.

Remarks

This record provides a summary view of saga state suitable for monitoring dashboards. It intentionally excludes the full saga state (StateJson) to minimize data transfer.

To determine saga health:

  • Healthy: IsCompleted == false and recently updated
  • Stuck: IsCompleted == false and not updated within threshold
  • Failed: FailureReason != null
  • Completed: IsCompleted == true and FailureReason == null

Properties

CompletedAt

The UTC timestamp when the saga completed, or null if still running.

public DateTimeOffset? CompletedAt { get; init; }

Property Value

DateTimeOffset?

CreatedAt

The UTC timestamp when the saga was created.

public DateTimeOffset CreatedAt { get; init; }

Property Value

DateTimeOffset

FailureReason

The failure reason if the saga failed, or null if succeeded or still running.

public string? FailureReason { get; init; }

Property Value

string

IsCompleted

Indicates whether the saga has completed. A completed saga may have succeeded or failed with compensation.

public bool IsCompleted { get; init; }

Property Value

bool

LastUpdatedAt

The UTC timestamp when the saga was last updated.

public DateTimeOffset LastUpdatedAt { get; init; }

Property Value

DateTimeOffset

SagaId

The unique identifier for the saga instance.

public Guid SagaId { get; init; }

Property Value

Guid

SagaType

The fully qualified type name of the saga.

public string SagaType { get; init; }

Property Value

string