Packages

object Trace extends Tracing

A singleton instance of Tracing (a facade-style API) that performs a number of Contexts lookups on each operation. Prefer "capturing" a Tracing instance for batching lookups.

See also

Tracing

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Trace
  2. Tracing
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def apply(): Tracing

    Returns a Tracing instance with captured Contexts so it's cheap to reuse.

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  7. def disable(): Unit

    Turn trace recording off.

  8. def enable(): Unit

    Turn trace recording on.

  9. def enabled: Boolean

    Whether or not trace recording is enabled on this process: false indicates it was shutdown either via -com.twitter.finagle.tracing.enabled flag or Trac.disable() API.

  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  14. def hasId: Boolean

    True if there is an identifier for the current trace.

    True if there is an identifier for the current trace.

    Definition Classes
    TraceTracing
  15. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  16. final def id: TraceId

    Get the current trace identifier.

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

    Definition Classes
    Tracing
  17. def idOption: Option[TraceId]

    Get the current identifier, if it exists.

    Get the current identifier, if it exists.

    Definition Classes
    TraceTracing
  18. final def isActivelyTracing: Boolean

    Return true if tracing is enabled with a good tracer pushed and at least one tracer decides to actively trace the current id.

    Return true if tracing is enabled with a good tracer pushed and at least one tracer decides to actively trace the current id.

    Definition Classes
    Tracing
  19. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  20. final def isTerminal: Boolean

    Return true if the current trace id is terminal.

    Return true if the current trace id is terminal.

    Definition Classes
    Tracing
  21. def letClear[R](f: ⇒ R): R

    Run computation f with all tracing state (tracers, trace id) cleared.

  22. def letId[R](traceId: TraceId, terminal: Boolean = false)(f: ⇒ R): R

    Run computation f with the given traceId.

    Run computation f with the given traceId.

    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

  23. def letIdOption[R](traceIdOpt: Option[TraceId])(f: ⇒ R): R

    A version of [com.twitter.finagle.tracing.Trace.letId] providing an optional ID.

    A version of [com.twitter.finagle.tracing.Trace.letId] providing an optional ID. If the argument is None, the computation f is run without altering the trace environment.

  24. def letTracer[R](tracer: Tracer)(f: ⇒ R): R

    Run computation f with tracer added onto the tracer stack.

  25. def letTracerAndId[R](tracer: Tracer, traceId: TraceId, terminal: Boolean = false)(f: ⇒ R): R

    Run computation f with the given tracer and trace id.

    Run computation f with the given tracer and trace id.

    terminal

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

  26. def letTracerAndNextId[R](tracer: Tracer, terminal: Boolean = false)(f: ⇒ R): R

    Run computation f with the given tracer, and a derivative TraceId.

    Run computation f with the given tracer, and a derivative TraceId. The implementation of this function is more efficient than calling letTracer, nextId and letId sequentially as it minimizes the number of request context changes.

    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. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  28. final def nextId: TraceId

    Create a derived id from the current TraceId.

    Create a derived id from the current TraceId.

    Definition Classes
    Tracing
  29. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  30. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  31. final def record(message: String, duration: Duration): Unit
    Definition Classes
    Tracing
  32. final def record(message: String): Unit
    Definition Classes
    Tracing
  33. final def record(ann: Annotation, duration: Duration): Unit
    Definition Classes
    Tracing
  34. final def record(ann: Annotation): Unit
    Definition Classes
    Tracing
  35. final 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.

    Definition Classes
    Tracing
  36. final def recordBinaries(annotations: Map[String, Any]): Unit
    Definition Classes
    Tracing
  37. final def recordBinary(key: String, value: Any): Unit
    Definition Classes
    Tracing
  38. final def recordClientAddr(ia: InetSocketAddress): Unit
    Definition Classes
    Tracing
  39. final def recordClientRecv(): Unit
    Definition Classes
    Tracing
  40. final def recordClientRecvError(error: String): Unit
    Definition Classes
    Tracing
  41. final def recordClientRecvFragment(): Unit
    Definition Classes
    Tracing
  42. final def recordClientSend(): Unit
    Definition Classes
    Tracing
  43. final def recordClientSendFrargmet(): Unit
    Definition Classes
    Tracing
  44. final def recordLocalAddr(ia: InetSocketAddress): Unit
    Definition Classes
    Tracing
  45. final def recordRpc(name: String): Unit
    Definition Classes
    Tracing
  46. final def recordServerAddr(ia: InetSocketAddress): Unit
    Definition Classes
    Tracing
  47. final def recordServerRecv(): Unit
    Definition Classes
    Tracing
  48. final def recordServerRecvFragment(): Unit
    Definition Classes
    Tracing
  49. final def recordServerSend(): Unit
    Definition Classes
    Tracing
  50. final def recordServerSendError(error: String): Unit
    Definition Classes
    Tracing
  51. final def recordServerSendFragment(): Unit
    Definition Classes
    Tracing
  52. final def recordServiceName(serviceName: String): Unit
    Definition Classes
    Tracing
  53. final def recordWireRecv(): Unit
    Definition Classes
    Tracing
  54. final def recordWireRecvError(error: String): Unit
    Definition Classes
    Tracing
  55. final def recordWireSend(): Unit
    Definition Classes
    Tracing
  56. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  57. 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

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

  59. def toString(): String
    Definition Classes
    AnyRef → Any
  60. 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.

  61. def tracers: List[Tracer]

    returns

    the current list of tracers

    Definition Classes
    TraceTracing
  62. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  63. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  64. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from Tracing

Inherited from AnyRef

Inherited from Any

Ungrouped