Settings for the Delayed Spans created by the traceBody and traceFunc helper functions.
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.
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.
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.
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.
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.
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.