src/main/java/com/awslabs/aws/greengrass/provisioner/data/diagnostics/FunctionTimedOutDiagnosticRule.java [23:44]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    @Override
    public Optional<List<String>> evaluate(Tuple3<LogGroup, LogStream, List<String>> input) {
        if (!isRuntimeLog(input)) {
            return Optional.empty();
        }

        return Optional.of(input._3.stream()
                .map(findJsonPattern::matcher)
                .filter(Matcher::matches)
                .map(this::buildErrorStrings)
                .filter(Optional::isPresent)
                .map(Optional::get)
                .flatMap(Collection::stream)
                .collect(Collectors.toList()));
    }

    private Optional<List<String>> buildErrorStrings(Matcher matcher) {
        String json = matcher.group(1);
        Map error = jsonHelper.fromJson(Map.class, json.getBytes());

        if (!error.containsKey("funcArn")) {
            return Optional.empty();
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



src/main/java/com/awslabs/aws/greengrass/provisioner/data/diagnostics/FunctionTimingOutDiagnosticRule.java [23:44]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    @Override
    public Optional<List<String>> evaluate(Tuple3<LogGroup, LogStream, List<String>> input) {
        if (!isRuntimeLog(input)) {
            return Optional.empty();
        }

        return Optional.of(input._3.stream()
                .map(findJsonPattern::matcher)
                .filter(Matcher::matches)
                .map(this::buildErrorStrings)
                .filter(Optional::isPresent)
                .map(Optional::get)
                .flatMap(Collection::stream)
                .collect(Collectors.toList()));
    }

    private Optional<List<String>> buildErrorStrings(Matcher matcher) {
        String json = matcher.group(1);
        Map error = jsonHelper.fromJson(Map.class, json.getBytes());

        if (!error.containsKey("funcArn")) {
            return Optional.empty();
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



