Object

kamon.instrumentation.futures.scala

ScalaFutureInstrumentation

Related Doc: package scala

Permalink

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

    Permalink

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

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. val Component: String

    Permalink
  5. object Settings extends Serializable

    Permalink
  6. final def asInstanceOf[T0]: T0

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean

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

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  15. final def notify(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  17. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  18. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  19. def trace[T](spanBuilder: SpanBuilder)(future: ⇒ Future[T])(implicit settings: Settings): Future[T]

    Permalink

    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 trace[T](operationName: String, tags: TagSet = TagSet.Empty, metricTags: TagSet = TagSet.Empty)(future: ⇒ Future[T])(implicit settings: Settings): Future[T]

    Permalink

    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.

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

    Permalink

    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 traceBody[S](operationName: String, tags: TagSet = TagSet.Empty, metricTags: TagSet = TagSet.Empty)(body: ⇒ S)(implicit settings: Settings): S

    Permalink

    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.

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

    Permalink

    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. def traceFunc[T, S](operationName: String, tags: TagSet = TagSet.Empty, metricTags: TagSet = TagSet.Empty)(body: (T) ⇒ S)(implicit settings: Settings): (T) ⇒ S

    Permalink

    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.

  25. final def wait(): Unit

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

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

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

Inherited from AnyRef

Inherited from Any

Ungrouped