Object

com.twitter.finagle.tracing

Trace

Related Doc: package tracing

Permalink

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. def apply(): Tracing

    Permalink

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

  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

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

    Permalink

    Turn trace recording off.

  8. def enable(): Unit

    Permalink

    Turn trace recording on.

  9. def enabled: Boolean

    Permalink

    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

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  14. def hasId: Boolean

    Permalink

    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

    Permalink
    Definition Classes
    AnyRef → Any
  16. final def id: TraceId

    Permalink

    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]

    Permalink

    Get the current identifier, if it exists.

    Get the current identifier, if it exists.

    Definition Classes
    TraceTracing
  18. final def isActivelyTracing: Boolean

    Permalink

    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

    Permalink
    Definition Classes
    Any
  20. final def isTerminal: Boolean

    Permalink

    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

    Permalink

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

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

    Permalink

    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

    Permalink

    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

    Permalink

    Run computation f with tracer added onto the tracer stack.

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

    Permalink

    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

    Permalink

    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

    Permalink
    Definition Classes
    AnyRef
  28. final def nextId: TraceId

    Permalink

    Create a derived id from the current TraceId.

    Create a derived id from the current TraceId.

    Definition Classes
    Tracing
  29. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  30. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  31. final def record(message: String): Unit

    Permalink
    Definition Classes
    Tracing
  32. final def record(ann: Annotation, duration: Duration): Unit

    Permalink
    Definition Classes
    Tracing
  33. final def record(ann: Annotation): Unit

    Permalink
    Definition Classes
    Tracing
  34. final def record(rec: Record): Unit

    Permalink

    Record a raw Record.

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

    Definition Classes
    Tracing
  35. final def recordBinaries(annotations: Map[String, Any]): Unit

    Permalink
    Definition Classes
    Tracing
  36. final def recordBinary(key: String, value: Any): Unit

    Permalink
    Definition Classes
    Tracing
  37. final def recordClientAddr(ia: InetSocketAddress): Unit

    Permalink
    Definition Classes
    Tracing
  38. final def recordClientRecv(): Unit

    Permalink
    Definition Classes
    Tracing
  39. final def recordClientRecvError(error: String): Unit

    Permalink
    Definition Classes
    Tracing
  40. final def recordClientRecvFragment(): Unit

    Permalink
    Definition Classes
    Tracing
  41. final def recordClientSend(): Unit

    Permalink
    Definition Classes
    Tracing
  42. final def recordClientSendFrargmet(): Unit

    Permalink
    Definition Classes
    Tracing
  43. final def recordLocalAddr(ia: InetSocketAddress): Unit

    Permalink
    Definition Classes
    Tracing
  44. final def recordRpc(name: String): Unit

    Permalink
    Definition Classes
    Tracing
  45. final def recordServerAddr(ia: InetSocketAddress): Unit

    Permalink
    Definition Classes
    Tracing
  46. final def recordServerRecv(): Unit

    Permalink
    Definition Classes
    Tracing
  47. final def recordServerRecvFragment(): Unit

    Permalink
    Definition Classes
    Tracing
  48. final def recordServerSend(): Unit

    Permalink
    Definition Classes
    Tracing
  49. final def recordServerSendError(error: String): Unit

    Permalink
    Definition Classes
    Tracing
  50. final def recordServerSendFragment(): Unit

    Permalink
    Definition Classes
    Tracing
  51. final def recordServiceName(serviceName: String): Unit

    Permalink
    Definition Classes
    Tracing
  52. final def recordWireRecv(): Unit

    Permalink
    Definition Classes
    Tracing
  53. final def recordWireRecvError(error: String): Unit

    Permalink
    Definition Classes
    Tracing
  54. final def recordWireSend(): Unit

    Permalink
    Definition Classes
    Tracing
  55. final def synchronized[T0](arg0: ⇒ T0): T0

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

    Permalink

    Time an operation and add a binary annotation to the current span with the duration.

    Time an operation and add a binary annotation to the current span with the duration.

    T

    return type

    message

    The message describing the operation

    f

    operation to perform

    returns

    return value of the operation

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

    Permalink

    Time an async operation and add a binary annotation to the current span with the duration.

  58. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  59. def traceLocal[T](name: String)(f: ⇒ T): T

    Permalink

    Create a span that begins right before the function is called and ends immediately after the function completes.

    Create a span that begins right before the function is called and ends immediately after the function completes. This span will never have a corresponding remote component and is contained completely within the process it is created.

  60. def traceLocalFuture[T](name: String)(f: ⇒ Future[T]): Future[T]

    Permalink

    Create a span that begins right before the function is called and ends immediately after the async operation completes.

    Create a span that begins right before the function is called and ends immediately after the async operation completes. This span will never have a corresponding remote component and is contained completely within the process it is created.

  61. def traceService[T](service: String, rpc: String, hostOpt: Option[InetSocketAddress] = None)(f: ⇒ T): T

    Permalink

    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.

  62. def tracers: List[Tracer]

    Permalink

    returns

    the current list of tracers

    Definition Classes
    TraceTracing
  63. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

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

    Permalink
    Definition Classes
    Tracing
    Annotations
    @deprecated
    Deprecated

    (Since version 2019-20-10) Use Trace#traceLocal instead

Inherited from Tracing

Inherited from AnyRef

Inherited from Any

Ungrouped