public Optional<String[]> attributesInclude() {
            if (options.has(attributesOpt)) {
                String[] attributes = Arrays.stream(options.valueOf(attributesOpt).split(","))
                        .sequential().filter(s -> !s.isEmpty()).toArray(String[]::new);
                return Optional.of(attributes);
            } else {
                return Optional.empty();
            }
        }
A program for reading JMX metrics from a given endpoint.
<p>
This tool only works reliably if the JmxServer is fully initialized prior to invoking the tool.
See KAFKA-4620 for details.
tools/src/main/java/org/apache/kafka/tools/JmxTool.java