When using java 11, "metrics.reporters" configuration has to be provided for reporters to be taken into account.
The desired behavior:
The MetricRegistryConfiguration looks for a conf like "metrics.reporters = foo,bar", if not found: all reporters that could be found in the configuration will be started.
In the code is it done bySet<String> includedReporters = reporterListPattern.splitAsStream(includedReportersString).collect(Collectors.toSet());
Definition of splitAsStream: If this pattern does not match any subsequence of the input then the resulting stream has just one element, namely the input sequence in string form.
It means reporterListPattern.splitAsStream("") should return "" and so includedReporters should have size 1 with "" as unique element
However there is a misbehavior in some version of java 8, it does return empty stream.
But working with java 11, the further code does not work: if (includedReporters.isEmpty() || includedReporters.contains(reporterName))
I would suggest to filter empty string:
Set<String> includedReporters = reporterListPattern.splitAsStream(includedReportersString).filter(s -> !s.isEmpty()).collect(Collectors.toSet());