in src/main/java/software/amazon/cloudwatchlogs/emf/environment/ECSEnvironment.java [57:79]
public boolean probe() {
String uri = getEnv(ECS_CONTAINER_METADATA_URI);
if (uri == null) {
return false;
}
checkAndSetFluentHost();
ObjectMapper objectMapper = new ObjectMapper();
objectMapper.configure(MapperFeature.ACCEPT_CASE_INSENSITIVE_PROPERTIES, true);
URI parsedURI = null;
try {
parsedURI = new URI(uri);
metadata = fetcher.fetch(parsedURI, objectMapper, ECSMetadata.class);
formatImageName();
return true;
} catch (Exception ex) {
log.debug("Failed to get response from: " + parsedURI, ex);
}
return false;
}