org.apache.cassandra.tracing

## Class Tracing

- java.lang.Object
- - org.apache.cassandra.tracing.Tracing

    public class Tracing
    extends java.lang.Object

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. All events and sessions are stored at keyspace.

### Field Summary

Fields
`static java.lang.String` `EVENTS_CF`
`static Tracing` `instance`
`static java.lang.String` `SESSIONS_CF`
`static java.lang.String` `TRACE_HEADER`
`static java.lang.String` `TRACE_KS`

### Constructor Summary

Constructors
Constructor and Description
`Tracing()`

### Method Summary

Methods
`static void` `addColumn(ColumnFamily cf, CellName name, java.net.InetAddress address)`
`static void` `addColumn(ColumnFamily cf, CellName name, int value)`
`static void` `addColumn(ColumnFamily cf, CellName name, long value)`
`static void` `addColumn(ColumnFamily cf, CellName name, java.lang.String value)`
`void` `addParameterColumns(ColumnFamily cf, java.util.Map<java.lang.String,java.lang.String> rawPayload)`
`void` `begin(java.lang.String request, java.util.Map<java.lang.String,java.lang.String> parameters)`
`static CellName` `buildName(CFMetaData meta, java.lang.Object... args)`
`void` `doneWithNonLocalSession(TraceState state)`
`TraceState` `get()`
`TraceState` `get(java.util.UUID sessionId)`
`java.util.UUID` `getSessionId()`
`TraceState` `initializeFromMessage(MessageIn<?> message)` Determines the tracing context from a message.
`static boolean` `isTracing()` Indicates if the current thread's execution is being traced.
`java.util.UUID` `newSession()`
`java.util.UUID` `newSession(java.util.UUID sessionId)`
`void` `set(TraceState tls)`
`void` `stopSession()` Stop the session and record its complete.
`static void` `trace(java.lang.String message)`
`static void` `trace(java.lang.String format, java.lang.Object arg)`
`static void` `trace(java.lang.String format, java.lang.Object[] args)`
`static void` `trace(java.lang.String format, java.lang.Object arg1, java.lang.Object arg2)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### TRACE_KS

    public static final java.lang.String TRACE_KS

See Also:
  Constant Field Values

#### EVENTS_CF

    public static final java.lang.String EVENTS_CF

See Also:
  Constant Field Values

#### SESSIONS_CF

    public static final java.lang.String SESSIONS_CF

See Also:
  Constant Field Values

#### TRACE_HEADER

    public static final java.lang.String TRACE_HEADER

See Also:
  Constant Field Values

#### instance

    public static final Tracing instance

### Constructor Detail

#### Tracing

    public Tracing()

### Method Detail

#### addColumn

    public static void addColumn(ColumnFamily cf,
                 CellName name,
                 java.net.InetAddress address)

#### addColumn

    public static void addColumn(ColumnFamily cf,
                 CellName name,
                 int value)

#### addColumn

    public static void addColumn(ColumnFamily cf,
                 CellName name,
                 long value)

#### addColumn

    public static void addColumn(ColumnFamily cf,
                 CellName name,
                 java.lang.String value)

#### addParameterColumns

    public void addParameterColumns(ColumnFamily cf,
                           java.util.Map<java.lang.String,java.lang.String> rawPayload)

#### buildName

    public static CellName buildName(CFMetaData meta,
                     java.lang.Object... args)

#### getSessionId

    public java.util.UUID getSessionId()

#### isTracing

    public static boolean isTracing()

Indicates if the current thread's execution is being traced.

#### newSession

    public java.util.UUID newSession()

#### newSession

    public java.util.UUID newSession(java.util.UUID sessionId)

#### doneWithNonLocalSession

    public void doneWithNonLocalSession(TraceState state)

#### stopSession

    public void stopSession()

Stop the session and record its complete. Called by coodinator when request is complete.

#### get

    public TraceState get()

#### get

    public TraceState get(java.util.UUID sessionId)

#### set

    public void set(TraceState tls)

#### begin

    public void begin(java.lang.String request,
             java.util.Map<java.lang.String,java.lang.String> parameters)

#### initializeFromMessage

    public TraceState initializeFromMessage(MessageIn<?> message)

Determines the tracing context from a message. Does NOT set the threadlocal state.

Parameters:
  `message` - The internode message

#### trace

    public static void trace(java.lang.String message)

#### trace

    public static void trace(java.lang.String format,
             java.lang.Object arg)

#### trace

    public static void trace(java.lang.String format,
             java.lang.Object arg1,
             java.lang.Object arg2)

#### trace

    public static void trace(java.lang.String format,
             java.lang.Object[] args)