We have gotten reports from a client that aggregates are not properly reported when using an AsynchronousCommandBus.
To quote:
i think i found the problem why nothing is reported about our aggregate instances.
AxonServerCommandBus -> spanFactory.createHandleCommandSpan(CommandBus.handleDistributedCommand) -> NOOP
localSegment -> spanFactory.createDispatchCommandSpan -> MeasuringConsoleSpan(CommandBus.dispatchCommand)
localSegment -> spanFactory.createHandleCommandSpan(CommandBus.handleCommand) -> NOOP
Our „localSegment" is actually an instance of „AsynchronousCommandBus".
So the span is created and started at step 2 for Thread A, but step 3 is executed on Thread B. Therefore, no message id is attached to Thread B and „AxoniqConsoleHandlerEnhancerDefinition"
can not register information on span about the handler being invoked. In addition, the span started at step 2 closes before step 3 completes.
This does not happen when using „SimpleCommandBus" as localSegment for AxonServerCommandBus, because step 2 and 3 are then invoked on the same thread.
I will check if we can easily change to SimpleCommandBus for localSegment.
We should find a way to attach the message id to the thread in the AsynchronousCommandBus
We have gotten reports from a client that aggregates are not properly reported when using an
AsynchronousCommandBus.To quote:
We should find a way to attach the message id to the thread in the
AsynchronousCommandBus