Package org.apache.cassandra.tracing
Class Tracing
java.lang.Object
org.apache.cassandra.concurrent.ExecutorLocals.Impl
org.apache.cassandra.tracing.Tracing
A trace session context. Able to track and store trace sessions. A session is usually a user initiated query, and may
have multiple local and remote events before it is completed.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Tracingprotected static final org.slf4j.Loggerprotected final ConcurrentMap<TimeUUID,TraceState> static final IVersionedSerializer<Tracing.TraceType> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddTraceHeaders(Map<ParamType, Object> addToMutable) abstract TraceStatevoidget()intgetTTL()initializeFromMessage(Message.Header header) Determines the tracing context from a message.static booleanIndicates if the current thread's execution is being traced.newSession(Map<String, ByteBuffer> customPayload) newSession(Tracing.TraceType traceType) newSession(TimeUUID sessionId, Map<String, ByteBuffer> customPayload) protected TimeUUIDnewSession(TimeUUID sessionId, Tracing.TraceType traceType, Map<String, ByteBuffer> customPayload) This method is intended to be overridden in tracing implementations that need access to the customPayloadprotected abstract TraceStatenewTraceState(InetAddressAndPort coordinator, TimeUUID sessionId, Tracing.TraceType traceType) voidset(TraceState tls) voidStop the session and record its complete.protected abstract voidstatic voidstatic voidstatic voidstatic voidabstract voidtrace(ByteBuffer sessionId, String message, int ttl) Called for non-local traces (traces that are not initiated by local node == coordinator).voidtraceOutgoingMessage(Message<?> message, int serializedSize, InetAddressAndPort sendTo) Record any tracing data, if enabled on this message.static voidtraceRepair(String format, Object... args) Methods inherited from class org.apache.cassandra.concurrent.ExecutorLocals.Impl
set
-
Field Details
-
traceTypeSerializer
-
logger
protected static final org.slf4j.Logger logger -
sessions
-
instance
-
-
Constructor Details
-
Tracing
public Tracing()
-
-
Method Details
-
getSessionId
-
getTraceType
-
getTTL
public int getTTL() -
isTracing
public static boolean isTracing()Indicates if the current thread's execution is being traced. -
newSession
-
newSession
-
newSession
-
newSession
protected TimeUUID newSession(TimeUUID sessionId, Tracing.TraceType traceType, Map<String, ByteBuffer> customPayload) This method is intended to be overridden in tracing implementations that need access to the customPayload -
doneWithNonLocalSession
-
stopSession
public void stopSession()Stop the session and record its complete. Called by coodinator when request is complete. -
stopSessionImpl
protected abstract void stopSessionImpl() -
get
-
get
-
set
-
begin
-
begin
-
initializeFromMessage
Determines the tracing context from a message. Does NOT set the threadlocal state.- Parameters:
header- The internode message header
-
traceOutgoingMessage
Record any tracing data, if enabled on this message. -
addTraceHeaders
-
newTraceState
protected abstract TraceState newTraceState(InetAddressAndPort coordinator, TimeUUID sessionId, Tracing.TraceType traceType) -
traceRepair
-
trace
-
trace
-
trace
-
trace
-
trace
Called for non-local traces (traces that are not initiated by local node == coordinator).
-