we recently integrated the axon tracing extension, which works just fine for tracing from our inbound channels (REST or message adapters) through the command handlers and into any tracking event processor handlers.
However, the extension does not seem to cover SAGAs so far. At least, whenever an event is handled by a SAGA, i.e. starts the saga, the tracing stops.
Okay, we’ve found the problem. Due to restrictions of the SAGA test fixture support, we used to use the EventBus within our SAGAs to publish events, including some custom metadata. Unfortunately, the tracing message handler interceptor does not kick in with the EventBus when publishing an EventMessage with metadata.
Also sending commands as GenericCommandMessage seems to work. It’s simply an issue of publishing GenericEventMessage in favor of the event itself, that causes the trace information to be dropped.
As you pointed out, spans are created on the CommandGateway and QueryGateway implementations of the extension-tracing.
And using the andMetadata() is the right choice as well!
Let us know if you need any other help or have more questions.