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 table.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `EVENTS_CF`
    `static org.slf4j.Logger` | `logger`
    `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
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `addColumn(ColumnFamily cf, java.nio.ByteBuffer name, java.net.InetAddress address)`
    `static void` | `addColumn(ColumnFamily cf, java.nio.ByteBuffer name, int value)`
    `static void` | `addColumn(ColumnFamily cf, java.nio.ByteBuffer name, long value)`
    `static void` | `addColumn(ColumnFamily cf, java.nio.ByteBuffer 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 java.nio.ByteBuffer` | `buildName(CFMetaData meta, java.nio.ByteBuffer... args)`
    `TraceState` | `get()`
    `TraceState` | `get(java.util.UUID sessionId)`
    `java.util.UUID` | `getSessionId()`
    `TraceState` | `initializeFromMessage(MessageIn<?> message)` Determines the tracing context from a message.
    `static Tracing` | `instance()` Fetches and lazy initializes the trace context.
    `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` | `stopNonLocal(TraceState state)`
    `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

    - #### logger

          public static final org.slf4j.Logger logger

  - ### Constructor Detail

    - #### Tracing

          public Tracing()

  - ### Method Detail

    - #### instance

          public static Tracing instance()

      Fetches and lazy initializes the trace context.

    - #### addColumn

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

    - #### addColumn

          public static void addColumn(ColumnFamily cf,
                       java.nio.ByteBuffer name,
                       int value)

    - #### addColumn

          public static void addColumn(ColumnFamily cf,
                       java.nio.ByteBuffer name,
                       long value)

    - #### addColumn

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

    - #### addParameterColumns

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

    - #### buildName

          public static java.nio.ByteBuffer buildName(CFMetaData meta,
                                      java.nio.ByteBuffer... 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)

    - #### stopNonLocal

          public void stopNonLocal(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)

Copyright © 2014 The Apache Software Foundation