Message tracing provides a view of the content and context of a message exchange on the SwitchYard bus by printing exchange information to the log. The trace is generated from an exchange interceptor which is triggered at the following points:

Immediately after the consumer sends the request message. For example, In the case of a service which is invoked from a service binding, this will be the point at which the gateway binding puts the message onto the bus.

Immediately before the service provider is invoked.

Immediately after the service provider is invoked.

At completion of the exchange before the message is returned to the consumer.

Trace Output

Trace output includes details on the metadata, context properties, payload, and attachments for a message exchange. Here is an example of a trace entry:

Enabling Message Tracing

Message tracing is enabled by setting the value of the "org.switchyard.handlers.messageTrace.enabled" property to true in your application domain. Domain properties are set via entries in the <domain> section of switchyard.xml. An easy shortcut to enabling tracing is to view the Domain tab of the visual application model in Eclipse and select the "Enable Message Trace" checkbox.