Class TaskAdviceHelper
java.lang.Object
io.opentelemetry.javaagent.bootstrap.executors.TaskAdviceHelper
Advice helper methods for concurrent task (e.g.
Runnable) instrumentations.-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> io.opentelemetry.context.ScopemakePropagatedContextCurrent(io.opentelemetry.instrumentation.api.util.VirtualField<T, PropagatedContext> virtualField, T task) Make thePropagatedContextassociated with thistaskcurrent and return the resulting scope.
-
Method Details
-
makePropagatedContextCurrent
@Nullable public static <T> io.opentelemetry.context.Scope makePropagatedContextCurrent(io.opentelemetry.instrumentation.api.util.VirtualField<T, PropagatedContext> virtualField, T task) Make thePropagatedContextassociated with thistaskcurrent and return the resulting scope. Will returnnullif there's no context attached to thistask.
-