{"action":"created","issue":{"url":"https://api.github.com/repos/cloudfoundry/cf-java-client/issues/875","repository_url":"https://api.github.com/repos/cloudfoundry/cf-java-client","labels_url":"https://api.github.com/repos/cloudfoundry/cf-java-client/issues/875/labels{/name}","comments_url":"https://api.github.com/repos/cloudfoundry/cf-java-client/issues/875/comments","events_url":"https://api.github.com/repos/cloudfoundry/cf-java-client/issues/875/events","html_url":"https://github.com/cloudfoundry/cf-java-client/issues/875","id":311496545,"number":875,"title":"ApplicationEvent::getDescription always empty for crashes","user":{"login":"robachmann","id":8127370,"avatar_url":"https://avatars2.githubusercontent.com/u/8127370?v=4","gravatar_id":"","url":"https://api.github.com/users/robachmann","html_url":"https://github.com/robachmann","followers_url":"https://api.github.com/users/robachmann/followers","following_url":"https://api.github.com/users/robachmann/following{/other_user}","gists_url":"https://api.github.com/users/robachmann/gists{/gist_id}","starred_url":"https://api.github.com/users/robachmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robachmann/subscriptions","organizations_url":"https://api.github.com/users/robachmann/orgs","repos_url":"https://api.github.com/users/robachmann/repos","events_url":"https://api.github.com/users/robachmann/events{/privacy}","received_events_url":"https://api.github.com/users/robachmann/received_events","type":"User","site_admin":false},"labels":[{"id":522036706,"url":"https://api.github.com/repos/cloudfoundry/cf-java-client/labels/bug","name":"bug","color":"ee0701","default":true},{"id":522047407,"url":"https://api.github.com/repos/cloudfoundry/cf-java-client/labels/operations","name":"operations","color":"c2e0c6","default":false}],"state":"closed","locked":false,"assignee":{"login":"twoseat","id":3470048,"avatar_url":"https://avatars2.githubusercontent.com/u/3470048?v=4","gravatar_id":"","url":"https://api.github.com/users/twoseat","html_url":"https://github.com/twoseat","followers_url":"https://api.github.com/users/twoseat/followers","following_url":"https://api.github.com/users/twoseat/following{/other_user}","gists_url":"https://api.github.com/users/twoseat/gists{/gist_id}","starred_url":"https://api.github.com/users/twoseat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twoseat/subscriptions","organizations_url":"https://api.github.com/users/twoseat/orgs","repos_url":"https://api.github.com/users/twoseat/repos","events_url":"https://api.github.com/users/twoseat/events{/privacy}","received_events_url":"https://api.github.com/users/twoseat/received_events","type":"User","site_admin":false},"assignees":[{"login":"twoseat","id":3470048,"avatar_url":"https://avatars2.githubusercontent.com/u/3470048?v=4","gravatar_id":"","url":"https://api.github.com/users/twoseat","html_url":"https://github.com/twoseat","followers_url":"https://api.github.com/users/twoseat/followers","following_url":"https://api.github.com/users/twoseat/following{/other_user}","gists_url":"https://api.github.com/users/twoseat/gists{/gist_id}","starred_url":"https://api.github.com/users/twoseat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twoseat/subscriptions","organizations_url":"https://api.github.com/users/twoseat/orgs","repos_url":"https://api.github.com/users/twoseat/repos","events_url":"https://api.github.com/users/twoseat/events{/privacy}","received_events_url":"https://api.github.com/users/twoseat/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/cloudfoundry/cf-java-client/milestones/45","html_url":"https://github.com/cloudfoundry/cf-java-client/milestone/45","labels_url":"https://api.github.com/repos/cloudfoundry/cf-java-client/milestones/45/labels","id":3189777,"number":45,"title":"2.28.0.RELEASE","description":"","creator":{"login":"twoseat","id":3470048,"avatar_url":"https://avatars2.githubusercontent.com/u/3470048?v=4","gravatar_id":"","url":"https://api.github.com/users/twoseat","html_url":"https://github.com/twoseat","followers_url":"https://api.github.com/users/twoseat/followers","following_url":"https://api.github.com/users/twoseat/following{/other_user}","gists_url":"https://api.github.com/users/twoseat/gists{/gist_id}","starred_url":"https://api.github.com/users/twoseat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twoseat/subscriptions","organizations_url":"https://api.github.com/users/twoseat/orgs","repos_url":"https://api.github.com/users/twoseat/repos","events_url":"https://api.github.com/users/twoseat/events{/privacy}","received_events_url":"https://api.github.com/users/twoseat/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":4,"state":"open","created_at":"2018-03-15T08:50:04Z","updated_at":"2018-04-06T08:45:48Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2018-04-05T07:13:19Z","updated_at":"2018-04-06T09:07:30Z","closed_at":"2018-04-06T08:45:48Z","author_association":"NONE","body":"I'm trying to get a list of crashes (within a given amount of hours) for each application using the following lines of code:\r\n\r\n```\r\nMap<String, Map<String, Integer>> crashStatusCountMap = new LinkedHashMap<>();\r\nList<ApplicationSummary> appSummary = cloudFoundryOperations.applications()\r\n    .list()\r\n    .toStream()\r\n    .collect(Collectors.toList());\r\n\r\nappSummary.forEach(\r\n    application -> {\r\n        Map<String, Integer> crashTypesPerApp = new LinkedHashMap<>();\r\n        final GetApplicationEventsRequest request = GetApplicationEventsRequest\r\n            .builder()\r\n            .name(application.getName())\r\n            .build();\r\n\r\n        List<ApplicationEvent> crashEvents = cloudFoundryOperations.applications().getEvents(request).toStream()\r\n            .filter(event -> LocalDateTime.ofInstant(event.getTime().toInstant(), ZoneId.systemDefault())\r\n                .plusHours(hours)\r\n                .isAfter(LocalDateTime.now()))\r\n            .filter(event -> event.getActor().equalsIgnoreCase(\"web\") && event.getEvent().contains(\"crash\"))\r\n            .collect(Collectors.toList());\r\n\r\n        crashEvents.forEach(crash -> {\r\n            String event = crash.getEvent();\r\n            String actor = crash.getActor();\r\n            String description = crash.getDescription();\r\n            String id = crash.getId();\r\n            Date time = crash.getTime();\r\n\r\n            String reason = crash.getDescription();\r\n                Integer integer = crashTypesPerApp.getOrDefault(reason, 0);\r\n                crashTypesPerApp.put(reason, integer + 1);\r\n            }\r\n        );\r\n\r\n        crashStatusCountMap.put(application.getName(), crashTypesPerApp);\r\n    });\r\n\r\nreturn crashStatusCountMap;\r\n```\r\n\r\nUnfortunately, `crash.getDescription()` is always empty, even though I see a description when using the CF web console, e.g.: \r\n```\r\nindex: 4\r\nexit_status: undefined\r\nexit_description: Instance became unhealthy: Failed to make HTTP request to '/health' on port 8080: connection refused (out of memory); APP/PROC/WEB: Exited with status 137 (out of memory)\r\nreason: CRASHED\r\n```\r\n\r\nused versions are:\r\n```\r\ncompile 'org.cloudfoundry:cloudfoundry-client-reactor:3.8.0.RELEASE'\r\ncompile 'org.cloudfoundry:cloudfoundry-operations:3.8.0.RELEASE'\r\ncompile 'io.projectreactor:reactor-core:3.1.2.RELEASE'\r\ncompile 'io.projectreactor.ipc:reactor-netty:0.7.2.RELEASE'\r\n```\r\nwith `CF API 2.106.0`\r\n"},"comment":{"url":"https://api.github.com/repos/cloudfoundry/cf-java-client/issues/comments/379194509","html_url":"https://github.com/cloudfoundry/cf-java-client/issues/875#issuecomment-379194509","issue_url":"https://api.github.com/repos/cloudfoundry/cf-java-client/issues/875","id":379194509,"user":{"login":"robachmann","id":8127370,"avatar_url":"https://avatars2.githubusercontent.com/u/8127370?v=4","gravatar_id":"","url":"https://api.github.com/users/robachmann","html_url":"https://github.com/robachmann","followers_url":"https://api.github.com/users/robachmann/followers","following_url":"https://api.github.com/users/robachmann/following{/other_user}","gists_url":"https://api.github.com/users/robachmann/gists{/gist_id}","starred_url":"https://api.github.com/users/robachmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robachmann/subscriptions","organizations_url":"https://api.github.com/users/robachmann/orgs","repos_url":"https://api.github.com/users/robachmann/repos","events_url":"https://api.github.com/users/robachmann/events{/privacy}","received_events_url":"https://api.github.com/users/robachmann/received_events","type":"User","site_admin":false},"created_at":"2018-04-06T09:07:30Z","updated_at":"2018-04-06T09:07:30Z","author_association":"NONE","body":"Paul, thank you very much for the really quick reaction and correction. Looking forward to the next release. "}}
{"actor":{"display_login":"robachmann"}}