com.twitter.finagle.tracing

Trace

object Trace extends AnyRef

Trace maintains the state of the tracing stack The current TraceId has a terminal flag, indicating whether it can be overridden with a different TraceId. Setting the current TraceId as terminal forces all future annotations to share that TraceId. When reporting, we report to all tracers in the list of Tracers.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. Trace
  2. AnyRef
  3. Any
Visibility
  1. Public
  2. All

Type Members

  1. sealed trait TraceState extends AnyRef

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clear(): Unit

    Completely clear the trace stack.

  8. def clone(): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  9. def disable(): Unit

    Turn trace recording off.

  10. def enable(): Unit

    Turn trace recording on.

  11. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  14. final def getClass(): java.lang.Class[_]

    Definition Classes
    AnyRef → Any
  15. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  16. def id: TraceId

    Get the current trace identifier.

    Get the current trace identifier. If no identifiers have been pushed, a default one is provided.

  17. def idOption: Option[TraceId]

    Get the current identifier, if it exists.

  18. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  19. def isTerminal: Boolean

    returns

    true if the current trace id is terminal

  20. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  21. def nextId: TraceId

    Create a derivative TraceId.

    Create a derivative TraceId. If there isn't a current ID, this becomes the root id.

  22. final def notify(): Unit

    Definition Classes
    AnyRef
  23. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  24. def pushTracer(tracer: Tracer): Unit

    Push the given tracer.

  25. def record(message: String, duration: Duration): Unit

  26. def record(message: String): Unit

  27. def record(ann: Annotation, duration: Duration): Unit

  28. def record(ann: Annotation): Unit

  29. def record(rec: Record): Unit

    Record a raw Record.

    Record a raw Record. This will record to a _unique_ set of tracers in the stack

  30. def recordBinaries(annotations: Map[String, Any]): Unit

  31. def recordBinary(key: String, value: Any): Unit

  32. def recordClientAddr(ia: InetSocketAddress): Unit

  33. def recordRpcname(service: String, rpc: String): Unit

  34. def recordServerAddr(ia: InetSocketAddress): Unit

  35. def setId(traceId: TraceId, terminal: Boolean = false): TraceId

    Set the current trace id Should be used with Trace.

    Set the current trace id Should be used with Trace.unwind for stack-like properties

    traceId

    the TraceId to set as the current trace id

    terminal

    true if traceId is a terminal id. Future calls to set() after a terminal id is set will not set the traceId

  36. def setTerminalId(traceId: TraceId): TraceId

  37. def state: TraceState

  38. def state_=(state: TraceState): Unit

  39. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  40. def time[T](message: String)(f: ⇒ T): T

    Time an operation and add an annotation with that duration on it

    Time an operation and add an annotation with that duration on it

    T

    return type

    message

    The message describing the operation

    f

    operation to perform

    returns

    return value of the operation

  41. def timeFuture[T](message: String)(f: Future[T]): Future[T]

    Runs the function f and logs that duration until the future is satisfied with the given name.

  42. def toString(): String

    Definition Classes
    AnyRef → Any
  43. def tracers: List[Tracer]

    returns

    the current list of tracers

  44. def unwind[T](f: ⇒ T): T

    Invoke f and then unwind the stack to the starting point.

  45. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  46. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  47. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()

Deprecated Value Members

  1. def pushId(traceId: TraceId): TraceId

    Annotations
    @deprecated
    Deprecated

    (Since version 5.0.1) use setId() instead

  2. def pushId(): TraceId

    Annotations
    @deprecated
    Deprecated

    (Since version 5.0.1) use setId() instead

Inherited from AnyRef

Inherited from Any