o

kamon.instrumentation.futures.scala

ScalaFutureInstrumentation

object ScalaFutureInstrumentation

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ScalaFutureInstrumentation
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. case class Settings(trackMetrics: Boolean, trackDelayedSpanMetrics: Boolean) extends Product with Serializable

    Settings for the Delayed Spans created by the traceBody and traceFunc helper functions.

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. val Component: String
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  15. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  16. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  17. def toString(): String
    Definition Classes
    AnyRef → Any
  18. def trace[T](spanBuilder: SpanBuilder)(future: ⇒ Future[T])(implicit settings: Settings): Future[T]

    Traces the execution of an asynchronous computation modeled by a Future.

    Traces the execution of an asynchronous computation modeled by a Future. This function will create a Span when it starts executing and set that Span as current while the code that created the actual Future executes and then, automatically finish that Span when the created Future finishes execution.

    The purpose of this function is to make it easy to trace an asynchronous computation as a whole, even though such computation might be the result of applying several transformations to an initial Future. If you are interested in tracing the intermediate computations as well, take a look at the traceBody and traceFunc functions bellow.

  19. def trace[T](operationName: String, tags: TagSet = TagSet.Empty, metricTags: TagSet = TagSet.Empty)(future: ⇒ Future[T])(implicit settings: Settings): Future[T]

    Traces the execution of an asynchronous computation modeled by a Future.

    Traces the execution of an asynchronous computation modeled by a Future. This function will create a Span when it starts executing and set that Span as current while the code that created the actual Future executes and then, automatically finish that Span when the created Future finishes execution.

    The purpose of this function is to make it easy to trace an asynchronous computation as a whole, even though such computation might be the result of applying several transformations to an initial Future. If you are interested in tracing the intermediate computations as well, take a look at the traceBody and traceFunc functions bellow.

  20. def traceBody[S](spanBuilder: SpanBuilder)(body: ⇒ S)(implicit settings: Settings): S

    Traces the execution of Future's body with a Delayed Span which takes into account the scheduling time when run inside of a CallbackRunnable.

    Traces the execution of Future's body with a Delayed Span which takes into account the scheduling time when run inside of a CallbackRunnable. This function is expected to be used when creating new Futures and wrapping the entire body of the Future as follows:

    Future(traceBody("myAsyncOperationName") { // Here goes the future body. })

    If the scheduling time cannot be determined this function will fall back to using a regular Span for tracking the Future's body since the only reasonable value for the scheduling time would be the start time, which would yield no wait time and the same processing and elapsed time, rendering the Delayed Span useless.

    IMPORTANT: Do not use this method if you are not going to run your application with instrumentation enabled. This method contains a call to Kamon.storeContext(...) which will only be cleaned up by the CallbackRunnable bytecode instrumentation. If instrumentation is disabled you risk leaving dirty threads that can cause incorrect Context propagation behavior.

  21. def traceBody[S](operationName: String, tags: TagSet = TagSet.Empty, metricTags: TagSet = TagSet.Empty)(body: ⇒ S)(implicit settings: Settings): S

    Traces the execution of Future's body with a Delayed Span which takes into account the scheduling time when run inside of a CallbackRunnable.

    Traces the execution of Future's body with a Delayed Span which takes into account the scheduling time when run inside of a CallbackRunnable. This function is expected to be used when creating new Futures and wrapping the entire body of the Future as follows:

    Future(traceBody("myAsyncOperationName") { // Here goes the future body. })

    If the scheduling time cannot be determined this function will fall back to using a regular Span for tracking the Future's body since the only reasonable value for the scheduling time would be the start time, which would yield no wait time and the same processing and elapsed time, rendering the Delayed Span useless.

    IMPORTANT: Do not use this method if you are not going to run your application with instrumentation enabled. This method contains a call to Kamon.storeContext(...) which will only be cleaned up by the CallbackRunnable bytecode instrumentation. If instrumentation is disabled you risk leaving dirty threads that can cause incorrect Context propagation behavior.

  22. def traceFunc[T, S](spanBuilder: SpanBuilder)(body: (T) ⇒ S)(implicit settings: Settings): (T) ⇒ S

    Traces the execution of a transformation on a Future with a Delayed Span which takes into account the scheduling time when run inside of a CallbackRunnable.

    Traces the execution of a transformation on a Future with a Delayed Span which takes into account the scheduling time when run inside of a CallbackRunnable. This function is expected to be used when creating callbacks on Futures and should wrap the entire actual callback as follows:

    Future(...) .map(traceFunc("myMapCallbackName")( // Here goes the actual callback. )) .filter(traceFunc("myFilterCallbackName")( // Here goes the actual callback. ))

    If the scheduling time cannot be determined this function will fall back to using a regular Span for tracking the traced callback since the only reasonable value for the scheduling time would be the start time, which would yield no wait time and the same processing and elapsed time, rendering the Delayed Span useless.

    IMPORTANT: Do not use this method if you are not going to run your application with instrumentation enabled. This method contains a call to Kamon.storeContext(...) which will only be cleaned up by the CallbackRunnable bytecode instrumentation. If instrumentation is disabled you risk leaving dirty threads that can cause incorrect Context propagation behavior.

  23. def traceFunc[T, S](operationName: String, tags: TagSet = TagSet.Empty, metricTags: TagSet = TagSet.Empty)(body: (T) ⇒ S)(implicit settings: Settings): (T) ⇒ S

    Traces the execution of a transformation on a Future with a Delayed Span which takes into account the scheduling time when run inside of a CallbackRunnable.

    Traces the execution of a transformation on a Future with a Delayed Span which takes into account the scheduling time when run inside of a CallbackRunnable. This function is expected to be used when creating callbacks on Futures and should wrap the entire actual callback as follows:

    Future(...) .map(traceFunc("myMapCallbackName")( // Here goes the actual callback. )) .filter(traceFunc("myFilterCallbackName")( // Here goes the actual callback. ))

    If the scheduling time cannot be determined this function will fall back to using a regular Span for tracking the traced callback since the only reasonable value for the scheduling time would be the start time, which would yield no wait time and the same processing and elapsed time, rendering the Delayed Span useless.

    IMPORTANT: Do not use this method if you are not going to run your application with instrumentation enabled. This method contains a call to Kamon.storeContext(...) which will only be cleaned up by the CallbackRunnable bytecode instrumentation. If instrumentation is disabled you risk leaving dirty threads that can cause incorrect Context propagation behavior.

  24. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  27. object Settings extends Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped