public static void ensureScopeUsesRequestContext(Tracing tracing) {
        requireNonNull(tracing, "tracing");
        final PingPongExtra extra = new PingPongExtra();
        // trace contexts are not recorded until Tracer.toSpan, so this won't end up as junk data
        final TraceContext dummyContext = TraceContext.newBuilder().traceId(1).spanId(1)
                                                      .addExtra(extra).build();
        final boolean scopeUsesRequestContext;
        try (Scope scope = tracing.currentTraceContext().newScope(dummyContext)) {
            scopeUsesRequestContext = extra.isPong();
        }
        if (!scopeUsesRequestContext) {
            throw new IllegalStateException(
                    "Tracing.currentTraceContext is not a " + RequestContextCurrentTraceContext.class
                            .getSimpleName() + " scope. " +
                    "Please call Tracing.Builder.currentTraceContext(" + RequestContextCurrentTraceContext.class
                            .getSimpleName() + ".ofDefault()).");
        }
    }
Ensures the specified {@link Tracing} uses a {@link RequestContextCurrentTraceContext}.

@throws IllegalStateException if {@code tracing} does not use {@link RequestContextCurrentTraceContext}
brave/brave6/src/main/java/com/linecorp/armeria/internal/common/brave/TraceContextUtil.java