monitor
Add a monitor to observe saga events.
Monitors are notified of all saga lifecycle events, enabling logging, metrics collection, and other observability features.
Return
This builder for method chaining
Parameters
monitor
The monitor to add
Add a monitor using a lambda.
Convenience method for creating a monitor from a lambda function. The handler is a suspend function, allowing async operations.
Return
This builder for method chaining
Parameters
handler
Suspend function to handle saga events