Axon Tracing Extension with SAGAs

Hi,

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.

Anyone knows how to fix that?

Regards,

Frank

3 Likes

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.

1 Like

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.

1 Like

SOLVED: we should have used andMetaData() in favor of withMetaData() to create those messages.

3 Likes

Hi @Frank_Scheffler, I am glad you found out the problem.

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.