Class TaskAdviceHelper

java.lang.Object
io.opentelemetry.javaagent.bootstrap.executors.TaskAdviceHelper

public final class TaskAdviceHelper extends Object
Advice helper methods for concurrent task (e.g. Runnable) instrumentations.
  • Method Details

    • makePropagatedContextCurrent

      @Nullable public static <T> io.opentelemetry.context.Scope makePropagatedContextCurrent(io.opentelemetry.instrumentation.api.util.VirtualField<T,PropagatedContext> virtualField, T task)
      Make the PropagatedContext associated with this task current and return the resulting scope. Will return null if there's no context attached to this task.