Class Java8BytecodeBridge
java.lang.Object
io.opentelemetry.javaagent.bootstrap.Java8BytecodeBridge
A helper for accessing methods that rely on new Java 8 bytecode features such as calling a static
interface methods. In instrumentation, we may need to call these methods in code that is inlined
into an instrumented class, however many times the instrumented class has been compiled to a
previous version of bytecode and so we cannot inline calls to static interface methods, as those
were not supported prior to Java 8 and will lead to a class verification error.
-
Method Summary
Modifier and TypeMethodDescriptionstatic io.opentelemetry.api.baggage.Baggage
baggageFromContext
(io.opentelemetry.context.Context context) static io.opentelemetry.context.Context
CallsContext.current()
.static io.opentelemetry.api.trace.Span
CallsSpan.current()
.static io.opentelemetry.context.Context
CallsContext.root()
.static io.opentelemetry.api.trace.Span
spanFromContext
(io.opentelemetry.context.Context context) CallsSpan.fromContext(Context)
.
-
Method Details
-
currentContext
public static io.opentelemetry.context.Context currentContext()CallsContext.current()
. -
rootContext
public static io.opentelemetry.context.Context rootContext()CallsContext.root()
. -
currentSpan
public static io.opentelemetry.api.trace.Span currentSpan()CallsSpan.current()
. -
spanFromContext
public static io.opentelemetry.api.trace.Span spanFromContext(io.opentelemetry.context.Context context) CallsSpan.fromContext(Context)
. -
baggageFromContext
public static io.opentelemetry.api.baggage.Baggage baggageFromContext(io.opentelemetry.context.Context context)
-