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 == falseand recently updated - Stuck:
IsCompleted == falseand not updated within threshold - Failed:
FailureReason != null - Completed:
IsCompleted == trueandFailureReason == 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
SagaIdGuidThe unique identifier for the saga instance.
SagaTypestringThe fully qualified type name of the saga.
IsCompletedboolIndicates whether the saga has completed. A completed saga may have succeeded or failed with compensation.
CreatedAtDateTimeOffsetThe UTC timestamp when the saga was created.
LastUpdatedAtDateTimeOffsetThe UTC timestamp when the saga was last updated.
CompletedAtDateTimeOffset?The UTC timestamp when the saga completed, or null if still running.
FailureReasonstringThe 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 == falseand recently updated - Stuck:
IsCompleted == falseand not updated within threshold - Failed:
FailureReason != null - Completed:
IsCompleted == trueandFailureReason == null
Properties
CompletedAt
The UTC timestamp when the saga completed, or null if still running.
public DateTimeOffset? CompletedAt { get; init; }
Property Value
CreatedAt
The UTC timestamp when the saga was created.
public DateTimeOffset CreatedAt { get; init; }
Property Value
FailureReason
The failure reason if the saga failed, or null if succeeded or still running.
public string? FailureReason { get; init; }
Property Value
IsCompleted
Indicates whether the saga has completed. A completed saga may have succeeded or failed with compensation.
public bool IsCompleted { get; init; }
Property Value
LastUpdatedAt
The UTC timestamp when the saga was last updated.
public DateTimeOffset LastUpdatedAt { get; init; }
Property Value
SagaId
The unique identifier for the saga instance.
public Guid SagaId { get; init; }
Property Value
SagaType
The fully qualified type name of the saga.
public string SagaType { get; init; }