You can’t get customer session data when using varnish cache in Magento 2. Because as soon as layout generation started, the customer session will be cleared by \Magento\PageCache\Model\Layout\DepersonalizePlugin::afterGenerateXml on all cacheable pages. So we can’t get any customer session data ...