Class ExecutorInstrumentationUtils
- java.lang.Object
-
- io.opentelemetry.javaagent.instrumentation.api.concurrent.ExecutorInstrumentationUtils
-
public final class ExecutorInstrumentationUtils extends Object
Utils for concurrent instrumentations.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcleanUpOnMethodExit(State state, Throwable throwable)Clean up after job submission method has exited.static <T> StatesetupState(ContextStore<T,State> contextStore, T task, io.opentelemetry.context.Context context)Create task state given current scope.static booleanshouldAttachStateToTask(Object task)Checks if given task should get state attached.
-
-
-
Method Detail
-
shouldAttachStateToTask
public static boolean shouldAttachStateToTask(Object task)
Checks if given task should get state attached.- Parameters:
task- task object- Returns:
- true iff given task object should be wrapped
-
setupState
public static <T> State setupState(ContextStore<T,State> contextStore, T task, io.opentelemetry.context.Context context)
Create task state given current scope.- Type Parameters:
T- task class type- Parameters:
contextStore- context storagetask- task instancecontext- current context- Returns:
- new state
-
-