private static RequestContextWrapper<?> wrapRequestContext(RequestContext ctx) {
        if (ctx instanceof ClientRequestContext) {
            return new TraceableClientRequestContext((ClientRequestContext) ctx);
        }
        assert ctx instanceof ServiceRequestContext;
        return new TraceableServiceRequestContext((ServiceRequestContext) ctx);
    }
Creates a new instance.

@param delegate the underlying {@link RequestContextStorage} that stores {@link RequestContext}
@param sampler the {@link Sampler} that determines whether to retain the stacktrace of the context leaks
core/src/main/java/com/linecorp/armeria/internal/common/LeakTracingRequestContextStorage.java