private TenantName getTenantNameFromEvent(PathChildrenCacheEvent event) {
        String path = event.getData().getPath();
        String[] pathElements = path.split("/");
        if (pathElements.length == 0)
            throw new IllegalArgumentException("Path " + path + " does not contain a tenant name");
        return TenantName.from(pathElements[pathElements.length - 1]);
    }
A helper to format a log preamble for messages with a tenant

@param tenant tenant
@return the log string
configserver/src/main/java/com/yahoo/vespa/config/server/tenant/TenantRepository.java