ApplicationSpecification spec = this.store.getApplication
(new Id.Application(new Id.Account(accountId), applicationId));
applications.add(spec);
}
Iterable<Discoverable> discoverables = this.discoveryServiceClient.discover(Constants.Service.METRICS);
Discoverable discoverable = new TimeLimitEndpointStrategy(new RandomEndpointStrategy(discoverables),
DISCOVERY_TIMEOUT_SECONDS, TimeUnit.SECONDS).pick();
if (discoverable == null) {
LOG.error("Fail to get any metrics endpoint for deleting metrics.");
throw new IOException("Can't find Metrics endpoint");