Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Option

Default

Description

formatter

 

Sets the Trace Formatter to use. Will default use org.apache.camel.processor.interceptor.DefaultTraceFormatter.

enabled

true

Flag to enable or disable this tracer

logLevel

INFO

The logging level to use: FATAL, ERROR, WARN, INFO, DEBUG, TRACE

logName

 

The log name to use. Will default use org.apache.camel.processor.interceptor.TraceInterceptor.

traceFilter

null

An exchange Predicate to filter the tracing.

traceInterceptors

false

Flag to enable or disable tracing of interceptors

traceExceptions

true

Flag to enable or disable tracing of thrown exception during processing of the exchange

destinationUri

null

Camel 2.0: Optional destination uri to route TraceEvent exchange TraceEventExchange containing TraceEventMessage with details about the trace. Can be used for custom processing to store traces in database using JPA.

...

This works by Camel creates a new TraceEventExchange containing:

  • snapshot of the original traced Exchange as a immutable TraceEventMessage containing String values of the fields, when the interception occurred. This ensures the fields contains the exact data at the given time of interception.
  • the original Exchange can be accessed using getTracedExchange()
Warning

Beware to access the original Exchange to avoid causing any side effects or alter its state. Prefer to access the information from TraceEventMessage

Camel routes the TraceEventExchange synchronously from the point of interception. When its completed Camel will continue routing the original Exchange.

...