com.twitter.finagle.tracing

Trace

object Trace

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. Trace
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
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[java.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[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  14. final def getClass(): 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. def isActivelyTracing: Boolean

    Returns true if tracing is enabled with a good tracer pushed and the current trace is sampled

  19. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  20. def isTerminal: Boolean

    returns

    true if the current trace id is terminal

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

    Definition Classes
    AnyRef
  22. def nextId: TraceId

    Create a derivative TraceId.

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

  23. final def notify(): Unit

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

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

    Push the given tracer.

  26. def pushTracerAndSetNextId(tracer: Tracer, terminal: Boolean = false): Unit

    Push the given tracer, create a derivative TraceId and set it to be the current trace id.

    Push the given tracer, create a derivative TraceId and set it to be the current trace id. The implementation of this function is more efficient than calling pushTracer, nextId and setId sequentially as it minimizes the number of reads and writes to local.

    tracer

    the tracer to be pushed

    terminal

    true if the next traceId is a terminal id. Future attempts to set nextId will be ignored.

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

  28. def record(message: String): Unit

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

  30. def record(ann: Annotation): Unit

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

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

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

  34. def recordClientAddr(ia: InetSocketAddress): Unit

  35. def recordLocalAddr(ia: InetSocketAddress): Unit

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

  37. def recordServerAddr(ia: InetSocketAddress): Unit

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

  39. def setTerminalId(traceId: TraceId): TraceId

  40. def state: TraceState

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

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

    Definition Classes
    AnyRef
  43. 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

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

  45. def toString(): String

    Definition Classes
    AnyRef → Any
  46. def traceService[T](service: String, rpc: String, hostOpt: Option[InetSocketAddress] = None)(f: ⇒ T): T

    Convenience method for event loops in services.

    Convenience method for event loops in services. Put your service handling code inside this to get proper tracing with all the correct fields filled in.

  47. def tracers: List[Tracer]

    returns

    the current list of tracers

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

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

  49. final def wait(): Unit

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

    Definition Classes
    AnyRef
    Annotations
    @throws()
  51. 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

Ungrouped