Beresp.backend.name not set

The documentation for beresp.backend.name tells me that this variable is preferred if a director is in use. But I always get (null) on it, when logging it from vcl_log. If I query rep.backend, then I get the director’s name, which makes sense. Is this WAI? Is there another field I could log to get the actual backend (either name or IP)? Or maybe I’m holding it wrong altogether, as I just put a backend=%{beresp.backend.name}V into my log line in vcl_log.

I’m a bit surprised that no-one seems to log the backend that actually served their request. Maybe because people generally have access to the backend logs and check for the request there?

Reading Access to beresp.http headers in Logging I wonder if what’s happening is that the cached object doesn’t persist beresp.backend.name? So maybe I need to copy it over into a header and retrieve it from there? That’d at least explain the (null), even though beresp.backend.name is documented to be available in vcl_log.

And it’s not like we’re using complicated VCL logic that’d by itself tamper with what object we’re seeing in services/archive.yaml · master · Debian System Administrators / mirror / cdn-fastly · GitLab.