Class Java8BytecodeBridge


  • public final class Java8BytecodeBridge
    extends Object
    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.
    • Constructor Detail

      • Java8BytecodeBridge

        public Java8BytecodeBridge()
    • Method Detail

      • currentContext

        public static io.opentelemetry.context.Context currentContext()
        Calls Context.current().
      • currentSpan

        public static io.opentelemetry.api.trace.Span currentSpan()
        Calls Span.current().
      • spanFromContext

        public static io.opentelemetry.api.trace.Span spanFromContext​(io.opentelemetry.context.Context context)
        Calls Span.fromContext(Context).