Optional<TenantName> resolveTenant(JRTServerConfigRequest request, Trace trace) {
        if ("*".equals(request.getConfigKey().getConfigId())) return Optional.of(ApplicationId.global().tenant());

        String hostname = request.getClientHostName();
        ApplicationId applicationId = hostRegistry.getApplicationId(hostname);
        if (applicationId == null) {
            if (GetConfigProcessor.logDebug(trace)) {
                String message = "Did not find tenant for host '" + hostname + "', using " + TenantName.defaultName() +
                                 ". Hosts in host registry: " + hostRegistry.getAllHosts();
                log.log(FINE, () -> message);
                trace.trace(6, message);
            }
            return Optional.empty();
        }
        return Optional.of(applicationId.tenant());
    }
Returns the tenant for this request, empty if there is none
(which on hosted Vespa means that the requesting host is not currently active for any tenant)
configserver/src/main/java/com/yahoo/vespa/config/server/rpc/RpcServer.java