Package org.apache.camel.spi
Interface BacklogTracer
-
public interface BacklogTracer
Backlog tracer that captures the last N messages during routing in a backlog.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
clear()
Clears the backlog of traced messages.List<BacklogTracerEventMessage>
dumpAllTracedMessages()
Dumps all tracing dataString
dumpAllTracedMessagesAsJSon()
Dumps all tracing data as JSonString
dumpAllTracedMessagesAsXml()
Dumps all tracing data as XMLList<BacklogTracerEventMessage>
dumpTracedMessages(String nodeId)
Dumps tracing data for the given route id / node idString
dumpTracedMessagesAsJSon(String nodeId)
Dumps tracing data for the given route id / node id as JSonString
dumpTracedMessagesAsXml(String nodeId)
Dumps tracing data for the given route id / node id as XMLint
getBacklogSize()
Number of messages to keep in the backlog.int
getBodyMaxChars()
Maximum number of bytes to keep for the message body (to prevent storing very big payloads)long
getQueueSize()
Number of traced messages in the backloglong
getTraceCounter()
Gets the trace counter (total number of traced messages)String
getTraceFilter()
Filter for tracing messagesString
getTracePattern()
Filter for tracing by route or node idboolean
isBodyIncludeFiles()
Trace messages to include message body from filesboolean
isBodyIncludeStreams()
Trace messages to include message body from streamsboolean
isEnabled()
Is the tracer enabled.boolean
isRemoveOnDump()
Remove the currently traced messages when dump methods are invokedboolean
isStandby()
Whether the tracer is standby.boolean
isTraceRests()
Whether to trace routes that is created from Rest DSL.boolean
isTraceTemplates()
Whether to trace routes that is created from route templates or kamelets.void
resetTraceCounter()
Reset the tracing countervoid
setBacklogSize(int backlogSize)
Number of messages to keep in the backlog.void
setBodyIncludeFiles(boolean bodyIncludeFiles)
Trace messages to include message body from filesvoid
setBodyIncludeStreams(boolean bodyIncludeStreams)
Trace messages to include message body from streamsvoid
setBodyMaxChars(int bodyMaxChars)
Maximum number of bytes to keep for the message body (to prevent storing very big payloads)void
setEnabled(boolean enabled)
To turn on or off the tracervoid
setRemoveOnDump(boolean removeOnDump)
Remove the currently traced messages when dump methods are invokedvoid
setStandby(boolean standby)
Whether the tracer is standby.void
setTraceFilter(String filter)
Filter for tracing messagesvoid
setTracePattern(String tracePattern)
Filter for tracing by route or node idvoid
setTraceRests(boolean traceRests)
Whether to trace routes that is created from route templates or kamelets.void
setTraceTemplates(boolean traceTemplates)
Whether to trace routes that is created from route templates or kamelets.
-
-
-
Method Detail
-
isEnabled
boolean isEnabled()
Is the tracer enabled.
-
setEnabled
void setEnabled(boolean enabled)
To turn on or off the tracer
-
isStandby
boolean isStandby()
Whether the tracer is standby.If a tracer is in standby then the tracer is activated during startup and are ready to be enabled manually via JMX or calling the enabled method.
-
setStandby
void setStandby(boolean standby)
Whether the tracer is standby.If a tracer is in standby then the tracer is activated during startup and are ready to be enabled manually via JMX or calling the enabled method.
-
getBacklogSize
int getBacklogSize()
Number of messages to keep in the backlog. Default is 1000.
-
setBacklogSize
void setBacklogSize(int backlogSize)
Number of messages to keep in the backlog. Default is 1000.
-
isRemoveOnDump
boolean isRemoveOnDump()
Remove the currently traced messages when dump methods are invoked
-
setRemoveOnDump
void setRemoveOnDump(boolean removeOnDump)
Remove the currently traced messages when dump methods are invoked
-
getBodyMaxChars
int getBodyMaxChars()
Maximum number of bytes to keep for the message body (to prevent storing very big payloads)
-
setBodyMaxChars
void setBodyMaxChars(int bodyMaxChars)
Maximum number of bytes to keep for the message body (to prevent storing very big payloads)
-
isBodyIncludeStreams
boolean isBodyIncludeStreams()
Trace messages to include message body from streams
-
setBodyIncludeStreams
void setBodyIncludeStreams(boolean bodyIncludeStreams)
Trace messages to include message body from streams
-
isBodyIncludeFiles
boolean isBodyIncludeFiles()
Trace messages to include message body from files
-
setBodyIncludeFiles
void setBodyIncludeFiles(boolean bodyIncludeFiles)
Trace messages to include message body from files
-
isTraceRests
boolean isTraceRests()
Whether to trace routes that is created from Rest DSL.
-
setTraceRests
void setTraceRests(boolean traceRests)
Whether to trace routes that is created from route templates or kamelets.
-
isTraceTemplates
boolean isTraceTemplates()
Whether to trace routes that is created from route templates or kamelets.
-
setTraceTemplates
void setTraceTemplates(boolean traceTemplates)
Whether to trace routes that is created from route templates or kamelets.
-
getTracePattern
String getTracePattern()
Filter for tracing by route or node id
-
setTracePattern
void setTracePattern(String tracePattern)
Filter for tracing by route or node id
-
getTraceFilter
String getTraceFilter()
Filter for tracing messages
-
setTraceFilter
void setTraceFilter(String filter)
Filter for tracing messages
-
getTraceCounter
long getTraceCounter()
Gets the trace counter (total number of traced messages)
-
getQueueSize
long getQueueSize()
Number of traced messages in the backlog
-
resetTraceCounter
void resetTraceCounter()
Reset the tracing counter
-
dumpAllTracedMessages
List<BacklogTracerEventMessage> dumpAllTracedMessages()
Dumps all tracing data
-
dumpTracedMessages
List<BacklogTracerEventMessage> dumpTracedMessages(String nodeId)
Dumps tracing data for the given route id / node id
-
dumpAllTracedMessagesAsXml
String dumpAllTracedMessagesAsXml()
Dumps all tracing data as XML
-
dumpTracedMessagesAsXml
String dumpTracedMessagesAsXml(String nodeId)
Dumps tracing data for the given route id / node id as XML
-
dumpAllTracedMessagesAsJSon
String dumpAllTracedMessagesAsJSon()
Dumps all tracing data as JSon
-
dumpTracedMessagesAsJSon
String dumpTracedMessagesAsJSon(String nodeId)
Dumps tracing data for the given route id / node id as JSon
-
clear
void clear()
Clears the backlog of traced messages.
-
-