Ship three production-ready middlewares so users get observability out of the box without writing boilerplate.
Scope
TracingMiddleware: opens an OpenTelemetry span per dispatch keyed on command type, MessageId and CorrelationId.
LoggingMiddleware: emits a tracing::info! event before and after each dispatch with elapsed time.
TimeoutMiddleware: cancels the dispatch after a configurable Duration, returns HexeractError::Timeout.
Acceptance criteria
Ship three production-ready middlewares so users get observability out of the box without writing boilerplate.
Scope
TracingMiddleware: opens an OpenTelemetry span per dispatch keyed on command type,MessageIdandCorrelationId.LoggingMiddleware: emits atracing::info!event before and after each dispatch with elapsed time.TimeoutMiddleware: cancels the dispatch after a configurableDuration, returnsHexeractError::Timeout.Acceptance criteria
TracingMiddlewarerecordsmessage_idandcorrelation_idas span attributes.LoggingMiddlewareoutput includes the command type name and elapsed milliseconds.TimeoutMiddlewarereturnsHexeractError::Timeoutwhen the handler exceeds the deadline.Cloneand are usable withoutArcwrapping.