Code review comment: Also lose the ":\n". Those are not for you to add  :-)

Code under review:
protected void maintain() {

        for (Application application : controller().applications().asList()) {
            for (Deployment deployment : application.deployments().values()) {
                try {
                    MetricsService.DeploymentMetrics metrics = controller().metricsService()
                            .getDeploymentMetrics(application.id(), deployment.zone());
                    DeploymentMetrics appMetrics = new DeploymentMetrics(metrics.queriesPerSecond(), metrics.writesPerSecond(),
                                                                         metrics.documentCount(), metrics.queryLatencyMillis(), metrics.writeLatencyMillis());

                    try (Lock lock = controller().applications().lock(application.id())) {

                        
                        application = controller().applications().require(application.id());
                        if (application == null)
                            break;

                        deployment = application.deployments().get(deployment.zone());
                        if (deployment == null)
                            continue;

                        controller().applications().store(application.with(deployment.withMetrics(appMetrics)), lock);
                    }
                }
                catch (UncheckedIOException e) {
                    log.log(Level.WARNING, "Timed out talking to YAMAS; retrying in " + maintenanceInterval() + ":\n", e);
                }
            }
        }

    }

Line commented on: log.log(Level.WARNING, "Timed out talking to YAMAS; retrying in " + maintenanceInterval() + ":\n", e);

Revised code:
protected void maintain() {

        for (Application application : controller().applications().asList()) {
            for (Deployment deployment : application.deployments().values()) {
                try {
                    MetricsService.DeploymentMetrics metrics = controller().metricsService()
                            .getDeploymentMetrics(application.id(), deployment.zone());
                    DeploymentMetrics appMetrics = new DeploymentMetrics(metrics.queriesPerSecond(), metrics.writesPerSecond(),
                                                                         metrics.documentCount(), metrics.queryLatencyMillis(), metrics.writeLatencyMillis());

                    try (Lock lock = controller().applications().lock(application.id())) {

                        
                        application = controller().applications().get(application.id()).orElse(null);
                        if (application == null)
                            break;

                        deployment = application.deployments().get(deployment.zone());
                        if (deployment == null)
                            continue;

                        controller().applications().store(application.with(deployment.withMetrics(appMetrics)), lock);
                    }
                }
                catch (UncheckedIOException e) {
                    log.log(Level.WARNING, "Timed out talking to YAMAS; retrying in " + maintenanceInterval(), e);
                }
            }
        }

    }